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: require an explanation comment for all disable directives #29

Closed
bradzacher opened this issue Jul 19, 2019 · 4 comments · Fixed by #44
Closed

new rule: require an explanation comment for all disable directives #29

bradzacher opened this issue Jul 19, 2019 · 4 comments · Fixed by #44

Comments

@bradzacher
Copy link

bradzacher commented Jul 19, 2019

It's way too easy to disable eslint rules. I don't want to disable them completely though, because sometimes you need to work around a rule.

I'd love to raise the bar so that there must be an explanation comment with the disable.

This makes it easier to review PRs, and means that people can remember why a rule was disabled "way back when" instead of potentially being fixed.

@mysticatea
Copy link
Owner

Thank you for your suggestion.

Sounds a good idea.

@mysticatea
Copy link
Owner

For reference, there is a related RFC: eslint/rfcs#33

@bradzacher
Copy link
Author

that's an awesome RFC!

@tuukka
Copy link

tuukka commented May 11, 2020

Now that the RFC has been implemented in ESLint 7.0.0 and an explanation comment is possible on the same line, should this issue become "new rule: require an explanation comment in disable directives"?

@bradzacher bradzacher changed the title new rule: require an explanation comment preceding disable comments new rule: require an explanation comment for all disable directives May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants