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
Allow comments after // eslint-disable-line <rule-name> #11298
Comments
Why is this solution better than having two comments? i.e.
This would add complexity to directive logic for parsing what is and isn't a rule name, and I'm not convinced the convenience outweighs that maintenance burden and increased surface area for bugs. |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
You're example is not really a real life one. This one is (kinda):
There is more visual correlation between te "real" comment than the eslint comment which makes it just confusing.
So I do think this solution is better than the workaround you suggested. |
@JvJefke Please feel free to create a new issue with a proposal if this is something you’d like to advocate for. Thanks! |
Because,
Would love to see @JvJefke solution if it's different than mine. If it's the same, can we keep it in this issue? |
+1 For this. Please reopen. |
There is currently an RFC open for this: eslint/rfcs#33 Please track the issue there. |
Ah. Okay, thx! |
The version of ESLint you are using.
5.12.1
The problem you want to solve.
I've just filed an issue against an incorrect (in my opinion) application of a rule. I want to disable that rule in my code, and mention why I've done so:
Including the URL on the same comment line is handy because I can click it from my IDE and check on the status, then remove the entire comment once the issue is fixed.
Another use case is simply explaining why a rule was removed.
Your take on the correct solution to problem.
eslint should ignore non-rule comments following
// eslint-disable-line <rule-name>
.eslint.org demo.
The text was updated successfully, but these errors were encountered: