Skip to content
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

Detect missing dependencies #15

Closed
sindresorhus opened this issue Feb 23, 2016 · 7 comments
Closed

Detect missing dependencies #15

sindresorhus opened this issue Feb 23, 2016 · 7 comments

Comments

@sindresorhus
Copy link
Owner

Meaning, dependencies required/imported in the module, but not defined in dependencies. To ensure I don't publish a release that has the dependency incorrectly in the devDependencies field. Like in the sindresorhus/grunt-concurrent#85 case. Could maybe be a ESLint rule.

@jfmengels
Copy link

I think you can do that with what is going on in import-js/eslint-plugin-import#241, by running ESLint with this rule

  • with option devDependencies set to false
  • only on files defined by package.json files field
  • or only on files not ignored by .npmignore

If you have neither of those fields set, the tool will have to get really smart about what are "production" files, and what are "dev" files. I'd say if you don't have those, you should not attempt this, as it will almost always fail.

@SamVerschueren
Copy link
Collaborator

Would be quite straightforward to implement now that we are using JavaScript as implementation language.

@sindresorhus
Copy link
Owner Author

@SamVerschueren I'm going to implement that in XO, so don't think this is needed anymore: xojs/xo#109

@SamVerschueren
Copy link
Collaborator

Not for us but maybe people that use ESLint instead of the superior XO ;)

@sindresorhus
Copy link
Owner Author

@SamVerschueren They can still use that plugin themselves though. I just think depending on ESLint by default here is a bit heavy and I don't want to deal with support stuff about it.

@SamVerschueren
Copy link
Collaborator

Yeah, good point!

@jamestalmage
Copy link
Contributor

I think this can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants