-
Notifications
You must be signed in to change notification settings - Fork 33
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
feature suggestion: support exceptions for the "prefer-...-dependencies" rules #93
Comments
Great suggestion, @lddubeau! |
I just went searching the repo here for "exception", I've a use case in the monorepo we use @WordPress where 20 of the packages require So thinking on a wider note, there would be a use case for many of the rules in this package to allow exceptions of some sort. |
@ntwb - I'm curious if you would prefer this for your monorepo scenario. The linter would use the first config object for the root package.json file. The linter would use the second config object package.json files in the submodules directory.
@lddubeau - is your scenario more like this? Exceptions to rules where, for example,
|
@tclindner Yep, within the same |
Thanks @tclindner looking at the file glob example:
I think having a glob pattern for ~20 paths, i.e. I want to exclude ~20 from the ~40 we have might get a little unwieldy. Whereas, your second example with an array of modules to exclude I think looks a little cleaner:
|
I use rules like
prefer-caret-version-dependencies
. However, sometimes a dependency has a problem that requires me to specify a version range that cannot be represented with a caret version.Looking at the documentation, I cannot see a way currently to specify exceptions to the rule. Either all dependencies are checked and if any of them don't use the caret syntax, I get an error. Or I have to turn off the rule or make it a warning. But a warning is not really the level of forcefulness I want. It is too easy to miss a warning.
The text was updated successfully, but these errors were encountered: