function-call-argument-newline invalid autofix with a line comment #12454
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
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:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
Online Demo Link
What did you expect to happen?
I'm not sure, maybe an error without autofix.
What actually happened? Please include the actual, raw output from ESLint.
Are you willing to submit a pull request to fix this bug?
Yes. #12280 should be probably merged first.
Autofix also doesn't work quite well when a comment or the comma
,
is on the same line with the argument that shouldn't have a linebreak before - Demo LinkThe reported locations are wrong and autofix just removes whitespace (or even inserts a new space in some cases), but the linebreak and the error are still there.
Maybe we could do here the same as with
array-element-newline
- Demo LinkFrom this demo, it looks like the logic is as the following:
Reported locations are also not correct.
The text was updated successfully, but these errors were encountered: