-
Notifications
You must be signed in to change notification settings - Fork 26
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
Bring in dependency banning and/or restricting rule(s) #54
Comments
I'd love to see this - definitely something missing from the eslint ecosystem at the moment! https://eslint.org/docs/latest/rules/no-restricted-imports#rule-details might be a good reference too, since it does something similar. Some granularity would be nice - one thing I've struggled with in large monorepos is gradually phasing out a dependency, which requires having warnings for some dependencies (i.e., those being removed), and errors for others (i.e., those already removed) in parallel. |
This raises a good point about the value of a new rule for this. If the usage sites of a restricted package are being reported using
The way I would see this going in practice is adding the package as a restricted import using |
Splitting out from #42:
npm-package-json-lint
has a family of rules that can ban variants of package dependencies:Additionally, other rules exist in that package and elsewhere for restricting dependency ranges:
I'd like to add in some kind of rule or rules to this package equivalent to those. Not clear yet how they'd look. Should they be one big configurable rule? Granular rules like how
npm-package-json-lint
& co have them? More thought required.Blocked on #40. Not a high priority issue given that this wouldn't be enabled by default in any recommended configs.✅The text was updated successfully, but these errors were encountered: