comma-style: Autofix can lead to parse error when line comment on preceding line and block comment on same line as solo comma #10632
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
bug
ESLint is working incorrectly
help wanted
The team would welcome a contribution from the community for this issue
rule
Relates to ESLint's core rules
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
Default
Please show your full configuration:
(See ESLint command)
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
What did you expect to happen?
Autofix to work with no syntax error afterwards; or no fix applied
What actually happened? Please include the actual, raw output from ESLint.
First pass autofix results in the following:
The line comment results in the opening of block comment 2 not taking effect, so the
foo bar
on the next line is not commented. This results in a parser error sincefoo bar
is not a valid expression.This example is a simplified version of a test case generated by the ESLint fuzz tool.
The text was updated successfully, but these errors were encountered: