Provide an option to insert eslint-disable(-next)-line for specific rules
See original GitHub issueThe version of ESLint you are using. 5.8.0
The problem you want to solve. I am adopting new rules in a large legacy codebase. It’s difficult to fix all of the errors immediately so I’d like an easy way of disabling existing violations when a new rule is added.
Your take on the correct solution to problem.
I would like an option that automatically inserts // eslint-disable-line foo
or // eslint-disable-next-line foo
comments for a specific rule or rules.
Are you willing to submit a pull request to implement this change? I am.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Turning off eslint rule for a specific line - Stack Overflow
To disable next line: // eslint-disable-next-line no-use-before-define var thing = new Thing();. Or use the single line syntax:
Read more >How to disable ESLint for some lines, files or folders
Ignore multiple files or folders ... To turn off ESLint in the whole file, you can add /* eslint-disable */ in the first...
Read more >Rules - ESLint - Pluggable JavaScript Linter
Rules are the core building block of ESLint. A rule validates if your code meets a certain expectation, and what to do if...
Read more >24. Enable or Disable ESLint rules for a particular file or the ...
In this video, we will see how to enable or disable the ESLint rules for a particular file or the set of lines...
Read more >User Guide | eslint-plugin-vue
If you want to run eslint from the command line, make sure you include the .vue extension using the --ext option or a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
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
That’s perfect. The existing
json
reporter looks like it should do the trick. Thank you.@btucker in terms of writing a tool for adding
// eslint-disable-line
s? I have some code that works with my company’s internal linter (which wraps eslint). The formatting is a bit different, but it wouldn’t take much to make it work with what thejson
reporter outputs.