-
-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: detect extraneous/missing imports/requires #101
base: master
Are you sure you want to change the base?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
It is great new rules for standard
to ensures we don't have missing dependencies or modules. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.json
I 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.