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.

Allow explanation of eslint-disable

See original GitHub issue

The version of ESLint you are using. eslint@5.16.0

The problem you want to solve. I want to disable a feature but I need to explain why.

This can be done on a separate line when you use block-level eslint-disable but it becomes awkward when using one-line disablers like eslint-disable-next-line.

Your take on the correct solution to problem.

// eslint-disable-next-line your-rule because "explanation"
// eslint-disable-next-line your-rule, "explanation"
// eslint-disable-next-line your-rule // "explanation"
// eslint-disable-next-line your-rule - "explanation"

Are you willing to submit a pull request to implement this change?

Way out of my comfort zone

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mysticateacommented, Nov 1, 2019

Because it’s a breaking change, it will be implemented in the next major release.

0reactions
glen-84commented, Nov 1, 2019

That’s fine if you plan to do it in the very near future, but if you don’t, then we don’t have a way of voting on and tracking progress of the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
How to disable ESLint for some lines, files or folders
To turn off ESLint in the whole file, you can add /* eslint-disable */ in the first line of that file. Alternatively, you...
Read more >
How to disable an ESLint rule - Flavio Copes
A quick tutorial on how to disable ESLint rules.
Read more >
Turning off eslint rule for a specific file - Stack Overflow
1) Disabling "All rules"​​ Two ways you can do this: Put /* eslint-disable-line */ at the end of the line(s), or /* eslint-disable-next-line...
Read more >
Ignore Lines and Files In ESLint - Mastering JS
Disabling ESLint With a Comment ... The // eslint-disable-line comment disables the no-eval rule for just that line. You can also disable the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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