question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support disabling specific rule fixes

See original GitHub issue

It 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:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

11reactions
tonybart1337commented, Jul 7, 2017

another use case is the rule no-debugger. It’s so annoying to type:

debugger; // eslint-disable-line no-debugger

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.

2reactions
not-an-aardvarkcommented, Nov 6, 2016

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:

eslint myFile.js --fix --rule 'some-rule-i-like: off'
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found