-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Unexpected indent error inside template string after ESLint bump from 4.3.0 to 4.4.1 #9107
Comments
Thanks for the report. However, I can't reproduce this issue -- no problems seem to be reported with either ESLint 4.4.1 or 4.3.0. Are you sure you pasted the code sample correctly? |
Hi I have the same issue, here. In my case, I updated eslint from v3.19.0 => v4.0.0, then this issue appeared. I tried upper versions like v4.30, v4.4.0, etc, but the issue persisted and also tried a few lower versions than 3.19.0, the issue didn't appear IMO, something might have happened between v3.19.0 ~ v.4.0.0 I uninstalled global eslint, used only local eslint. |
@suewonjp Can you please provide more details about what the issue was (preferably by filling out the bug report template)? The |
I found the troubled code. I wrote code like the following that previous versions of eslint didn't care;
Looks like newer versions only pass code like this:
I'll modify my code according to newer rules. But can you tell me specific reason why this kind of change was necessary? I'm not sure enforcing users to change their code like this is really worth it... |
The If you'd like to restore the |
Thanks. Your suggestion is helpful a lot |
I tried to minimize this issue in a new project. Downgrading this project to 4.3.0, in which it used to work for me, still triggers the error now. This seems to be related to |
Ok, thanks for checking again. I'm going to close this since it doesn't seem to be an issue with |
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using? babel-eslint
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
I expected no errors.
If the inline arrow function is transformed so the curly braces are removed, the indent error is gone:
What actually happened? Please include the actual, raw output from ESLint.
Since I updated from ESLint 4.3.0 to 4.4.1, the last line in that template string triggers the indent rule.
The text was updated successfully, but these errors were encountered: