feat: detect extraneous/missing imports/requires#101
feat: detect extraneous/missing imports/requires#101julien-f wants to merge 2 commits intostandard:masterfrom
Conversation
- extraneous: modules that are absent from `package.json` - missing: modules that do not exist (necessary for local modules)
|
Any idea why the tests are failing? |
|
It seems like the following code is now producing two errors 🤔 eslint-config-standard/test/validate-config.js Lines 12 to 14 in 176bbdd |
|
@mysticatea any idea? |
|
|
|
Thank you! @mysticatea what's your opinion of enabling these rules in |
|
@julien-f It's a good idea. But if users use AMD's |
|
I'm not sure this belongs in a javascript linter but leaning towards that it might rather belong in something that focused on linting ones dependencies. Apart from the linting this PR mentions such linting can eg:
(Disclaimer: I co-maintain one such linter, https://github.com/maxogden/dependency-check, and have created a complementary such linter myself as well, https://github.com/voxpelli/node-installed-check/) As |
theoludwig
left a comment
There was a problem hiding this comment.
LGTM!
It is great new rules for standard to ensures we don't have missing dependencies or modules. 👍
voxpelli
left a comment
There was a problem hiding this comment.
I think this is out of scope of what standard should be caring about.
And also: If we are to include this we anyways need to run it against current users of standard first to see how much of a regression it would be for standard's users and then consider whether its something that's feasible to push or whether it will cause havoc.
package.jsonI have started testing this config in my projects, it seems to work fine, I did not see any major perf impact but we should pay attention to it.