-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
"overrides" section from included ruleset is ignored #2331
Comments
Hey! |
Hm, is there a reason behind it? Is it stated in the documentation somewhere? What other sections will NOT be picked up from the ruleset files connected through "extends"? |
It seems that #2237 is about similar inheritance problem with aliases... |
A good outcome here would be to either let overrides be inhereted, or document why overrides are not being inhereted. Making it clear either way is the main thing. @mnaumanali94 @heitortsergent |
If you really do want to overrides to be be inherited, you can use JS rulesets, and so something as follows import rulesetA from './ruleset';
export default {
extends: rulesetA,
overrides: rulesetA.overrides,
}; The reason they are not inherited is mostly to avoid confusion. Overrides are usually specific to a particular project you lint, so having a shareable ruleset with some overrides in it doesn't make much sense. |
Perfect, if we could put that into documentation then there won’t be any confusion, and we’re offering people a workaround if they really want it. |
I'll update the docs with the workaround and the reason. :) |
🎉 This issue has been resolved in version 6.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Describe the bug
I have a master ruleset file which includes other files via "extends".
I need to define some "overrides" rules and I want to place them in a separate file and add it via "extens".
So, when I define the "overrides" section in external file, it is not applied.
If I do the same in master file, it works as expected.
To Reproduce
Actual behavior
Overrides from included file are not applied
Expected behavior
Overrides from included file should be applied
Environment:
The text was updated successfully, but these errors were encountered: