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

Add no-abusive-eslint-disable rule #33

Closed
wants to merge 3 commits into from

Conversation

jfmengels
Copy link
Contributor

This is a rule proposal, but as I wanted to know whether it was actually possible, I accidentally went all the way :p

I saw this message by @alanhussey on the ESLint Gitter, and thought it was a pretty good idea.

The proposal is to enforce specifying the rules to disable when you use eslint-disable/eslint-disable-line, as you can otherwise hide some useful error reports.

Let me know what you think :)

@jamestalmage
Copy link
Contributor

Should we give them the option of disabling this for disable line comments?

@jfmengels
Copy link
Contributor Author

I thought of that too, but ultimately I don't see the point all that much. I'd say let's wait until someone requests it and gives a good reason.

// will be ignored due to the disable comment
loc: {line: 0, column: 0},
// So specify it in the message
message: 'Specify the rule(s) you want to disable at line {{line}}:{{column}}',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rule(s) => rules

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specify the exact rules you want to disable at line

@sindresorhus
Copy link
Owner

I like it. I'm guilty of this too.

@jfmengels
Copy link
Contributor Author

I like it. I'm guilty of this too.

Yeah, I found it quite a few times in the AVA repo :p

I've handled the comments, thanks!

@jfmengels
Copy link
Contributor Author

Updated the wording to remove "exact"

@jfmengels
Copy link
Contributor Author

Cool :)

@jfmengels jfmengels deleted the no-abusive-eslint-disable branch June 7, 2016 12:19
sindresorhus pushed a commit that referenced this pull request Jun 7, 2016
This is a rule proposal, but as I wanted to know whether it was actually possible, I *accidentally* went all the way :p

I saw [this message](https://gitter.im/eslint/eslint?at=5751c0393bdac7ae37b46224) by @alanhussey on the ESLint Gitter, and thought it was a pretty good idea.

The proposal is to enforce specifying the rules to disable when you use `eslint-disable`/`eslint-disable-line`, as you can otherwise hide some useful error reports.

Let me know what you think :)

Closes #33
@sindresorhus
Copy link
Owner

Landed \o/

leo-yay

@jfmengels
Copy link
Contributor Author

There you go @alanhussey, thanks for the idea :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants