Uh oh!
There was an error while loading. Please reload this page.
[WIP] Refuse to build if user is importing something that isn't declared in package.json - #1752
[WIP] Refuse to build if user is importing something that isn't declared in package.json#1752matoilic wants to merge 4 commits into
Conversation
gaearon
commented
Mar 7, 2017
That’s the fun part. 👍 |
nfcampos
commented
Mar 7, 2017
i believe something along these lines should do the trick classWatchPackageJson{apply(compiler){compiler.plugin("emit",function(compilation,cb){compilation.fileDependencies.push(paths.appPackageJson)cb()})}} |
What we can do is change the file timestamp through
|
gaearon
commented
Mar 7, 2017
FWIW we did not enable this setting in the end (for unrelated reason). Isn't it off by default? |
matoilic
commented
Mar 7, 2017
You're right. The error overlay was stuck for some reason and that's why I thought the results were cached. Sorry for that, I was too quick with my conclusion there. It's already a bit late where I am 😴. I'll see how far I get with the |
gaearon
commented
Mar 7, 2017
Don’t lose sleep over it, we can come back to this later 😉 |
nfcampos
commented
Mar 8, 2017
let me try again this time with a loader ;) |
…ransitive or non-existent dependencies are imported
fcf87a9 to
efdb992CompareI've added a first version of a plugin which triggers a recheck of files errors when @nfcampos Thank you for the loader implementation. This is also a possible solution. The only downside here ist that |
38410f3 to
a1ca6d2Compare… erroneous files when package.json is changed, because it might resolve the issue.
…traneous dependencies
a1ca6d2 to
00e0f58Comparegaearon
commented
Jan 9, 2018
How close is this to being finished? Is there more things to do / test? |
mattfysh
commented
Jun 22, 2018
@matoilic is this something you're still interested in? thx! |
This is a try to implement #1725. Currently it only enables the
import/no-extraneous-dependenciesESLint rule. The challenge is now to find a way to forceeslint-loaderto revalidate invalid files when thepackage.jsonchanges, e.g. when the user fixes a transitive dependency issue by adding the package to his or her ownpackage.json.