Skip to content
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

New rule idea: Warn when a disable is unnecessary #2

Closed
j-f1 opened this issue Jul 10, 2017 · 2 comments
Closed

New rule idea: Warn when a disable is unnecessary #2

j-f1 opened this issue Jul 10, 2017 · 2 comments

Comments

@j-f1
Copy link

j-f1 commented Jul 10, 2017

For example:

var x = 2;
/* eslint-disable no-undef */ // Error: `no-undef` rule is not triggered in this section.
x = 3
/* eslint-enable no-undef */

This verifies that you actually need all of your eslint-disable* comments.

@mysticatea
Copy link
Owner

Thank you for this issue.

However I'm confused. Is it different from no-unused-disable rule?

@j-f1
Copy link
Author

j-f1 commented Jul 11, 2017

No, that rule covers it. Thanks for pointing that out!

@j-f1 j-f1 closed this as completed Jul 11, 2017
ota-meshi referenced this issue in ota-meshi/eslint-plugin-eslint-comments Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants