-
Notifications
You must be signed in to change notification settings - Fork 62
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
build/no-extraneous-dependencies #510
Conversation
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.
Nice, quite a few missing deps added! 💪
I hope the new eslint rule didn't add too much to our lint time. How long did it take to commit?
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 🚀
No noticeable difference 🧘 |
341b8f0
373c348
to
341b8f0
Compare
75108d9
to
858dcf0
Compare
…pendencies This rule, with the configuration to specify test files, ensures packages used in `src` are listed in the package.json `dependencies`. It will fail if missing or if the dependency is included with `devDependencies`. Development dependencies are checked against the test directories. There's a single disable as it's complaining about transitive dependency on `@types/pg` missing from `dependencies`. We can see if the feature added in import-js/eslint-plugin-import#2543 handles this scenario once released.
858dcf0
to
35f7fc9
Compare
Context
We have quite a few issues with the package dependencies, which is not unexpected, given the lack of enforcement and this being such a tedious aspect of maintaining a monorepo with Node.js' inferred dependencies design.
Proposed Solution
This rule, with the configuration to specify test files, ensures packages used in
src
are listed in the package.jsondependencies
. It will fail if missing or if the dependency is included withdevDependencies
. Development dependencies are checked against the test directories.Important Changes Introduced
There's a single disable as it's complaining about transitive dependency on
@types/pg
missing fromdependencies
. We can see if the feature added in import-js/eslint-plugin-import#2543 handles this scenario once released.New similar imports may need to be overruled moving forward, but I only found one case in the whole workspace, so don't expect it to be a frequently occurring situation.