-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
eslint treats multiline for/of as a single line #9992
eslint treats multiline for/of as a single line #9992
Comments
Thanks for the report. It looks like the issue is that the report location for |
@kaicataldo @not-an-aardvark @piotr-s-brainhub I now had to change the location of my The first time in 4.18.0 and I was quite happy because it is a lot more intuitive to see the error on the loop and only use It is not the couple of hours I spend changing this twice, but I liked the new behavior in 4.18.0 a lot better and think it is a lot more intuitive and easy to use. |
@doberkofler As noted in this issue, this was a regression and not an intended change. Please feel free to make an issue with a proposal if you feel the behavior should be different. Thanks! |
@kaicataldo I absolutely understand. I just wanted to suggest, that people (like myself) might have already adapted the code to what they expected to be an improvement. I liked this regression; a lot ;-) |
@doberkofler it's definitely a bug because a line is a line, not a block of many lines if you want, you may propose a feature |
You can always use |
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using? default
Please show your full configuration:
so
./node_modules/.bin/eslint --print-config 1.js
gives: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.
What did you expect to happen?
The eslint should pass (display nothing).
What actually happened? Please include the actual, raw output from ESLint.
More info
Please notice in the example above
await
is in the 8. line but eslint shows an error in the 6. line.On the other hand such code passes:
So it looks like the entire
for / of
loop is treated as a single line.The text was updated successfully, but these errors were encountered: