support disabling specific rule fixes
See original GitHub issueIt would be great if there was a way to opt into the checking done by an ESLint rule, but opt out of the fix it provides if someone finds it undesirable. That way we could get the linting benefit and be able to use the fixes from other rules, just not undesirable ones. Maybe it could look something like this:
"some-rule-I-like": ["error", "nofix", {rule-config-goes-here}],
Issue Analytics
- State:
- Created 7 years ago
- Reactions:9
- Comments:19 (8 by maintainers)
Top Results From Across the Web
Turning off eslint rule for a specific file - Stack Overflow
1) Disabling "All rules" · You can go with 1.2 and add /* eslint-disable */ on top of the files, one by one....
Read more >The rules on this computer do not match the rules on Microsoft ...
"One or more rules cannot be uploaded to Microsoft Exchange and have been deactivated. This could be because some of the parameters are...
Read more >Disable and suppress inspections | IntelliJ IDEA Documentation
Some inspections may report problems that you currently do not want to see. In this case, you can disable or suppress them.
Read more >Listener rules for your Application Load Balancer
Learn how to update the rules that your Application Load Balancer uses to route requests.
Read more >Command Line Interface - ESLint - Pluggable JavaScript Linter
Deprecated: Use rules from plugins Fix problems: --fix Automatically fix ... comments from changing config or rules --report-unused-disable-directives Adds ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
another use case is the rule
no-debugger
. It’s so annoying to type:Yes, I can make another config and disable that rule for development, but I want to be notified about it in development, because it’s so common to remove
debugger;
the second I used it.Thanks for the suggestion. This was also discussed here: https://github.com/eslint/eslint/issues/5329
Note that as a workaround, you can disable the rule from the command line when autofixing: