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

Bring in dependency banning and/or restricting rule(s) #54

Open
JoshuaKGoldberg opened this issue Sep 20, 2023 · 1 comment
Open

Bring in dependency banning and/or restricting rule(s) #54

JoshuaKGoldberg opened this issue Sep 20, 2023 · 1 comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Sep 20, 2023

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.

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request status: blocked Waiting for something else to be resolved labels Sep 20, 2023
@JoshuaKGoldberg JoshuaKGoldberg changed the title Bring in dependency banning rule(s) Bring in dependency banning and/or restriting rule(s) Sep 20, 2023
@JoshuaKGoldberg JoshuaKGoldberg changed the title Bring in dependency banning and/or restriting rule(s) Bring in dependency banning and/or restricting rule(s) Sep 20, 2023
@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Please, send a pull request to resolve this! and removed status: blocked Waiting for something else to be resolved labels Nov 6, 2023
@MorrisonCole
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
Development

No branches or pull requests

2 participants