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
spaced-comment
should allow line ending after markers
#12036
spaced-comment
should allow line ending after markers
#12036
Comments
Hi @tiansh, thanks for the issue. This feels like a bug to me. I think it shouldn't matter if a comment has markers after the content or not. I'm going to relabel this as a bug, but team members can feel free to correct that if needed. |
Reproduction here, so marking as accepted. |
@platinumazure Repro link is broken. |
@g-plane Sorry, bad paste. It's fixed now. |
I'm working on this, but have a question. Should the rule also allow these: /* eslint spaced-comment: ["error", "always", { "block": { "markers": ["foo"] } }] */
/*foo*/ /* eslint spaced-comment: ["error", "always", { "block": { "markers": ["foo"], balanced: true } }] */
/*foo*/ I.e. ignore a comment that contains only a marker like it already ignores an empty The issue with
|
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
If anyone cares for a workaround, this worked for me: "markers": ["#region"],
"exceptions": ["#endregion"] |
What rule do you want to change?
spaced-comment
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.)?
default behavior
Please provide some example code that this change will affect:
What does the rule currently do for this code?
using
--fix
cannot fix it (since there are no possible auto fix)What will the rule do after it's changed?
pass without tip an error
Are you willing to submit a pull request to implement this change?
Maybe no
spaced-comment
does allow line ending after//
without using markers. And this behavior should be applied to markers too imo.The text was updated successfully, but these errors were encountered: