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
no-inline-comments exception for istanbul ignore comments #12755
Comments
Can you provide an error that you are seeing? |
eslint output:
|
An option where user can define a regex pattern (or array of patterns?) to ignore comments that match the pattern seems reasonable to me. |
I think an option to allow this would be fine. Alternatively, you can disable the |
I think it would be useful to support this in some way 👍 Exceptions (default and options) are already supported in other comment rules: line-comment-position, capitalized-comments and lines-around-comment.
|
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
I'll champion this. |
This will be fixed by #13029, we'll add |
What rule do you want to change?
no-inline-comments
Does this change cause the rule to produce more or fewer warnings?
Fewer
How will the change be implemented? (New option, new default behavior, etc.)?
Either a new option or default behavior could work depending on what eslint maintainers think is appropriate.
Please provide some example code that this change will affect:
What does the rule currently do for this code?
Report an error
What will the rule do after it's changed?
Allow an exception for
istanbul ignore
comments. This is needed as the location of this comment matters. For it to ignore the chained else branch the comment needs to be directly beforeelse if
or between theelse
andif
.Are you willing to submit a pull request to implement this change?
I can try if this is an acceptable change and if I'm given guidance about an option vs default behavior.
The text was updated successfully, but these errors were encountered: