Indentation for certain TypeScript code broken in 4.19.0 #10117
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
auto closed
The bot closed this issue
bug
ESLint is working incorrectly
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
indent
Relates to the `indent` rule
rule
Relates to ESLint's core rules
What parser (default, Babel-ESLint, etc.) are you using? typescript-eslint
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.
What did you expect to happen?
No linting errors.
What actually happened? Please include the actual, raw output from ESLint.
3:1 error Expected indentation of 4 spaces but found 8 indent 4:1 error Expected indentation of 0 spaces but found 4 indent ✖ 2 problems (2 errors, 0 warnings) 2 errors, 0 warnings potentially fixable with the `--fix` option.
This issue has something specifically to do with TypeScript. However, it was caused by a change in the 4.19.0 release of ESLint so I'm posting it here to see if there are any insights or any obvious things that might be wrong with the ESLint change, or something obvious that would have to be changed in the TypeScript parser. If I remove the generic typing from the code above to make it:
Then it lints fine. I've traced the issue to this commit: 2e68be6#diff-f7ae198ea24182d178b8f3376e61b6edR1406. Specifically the function starting at that line. If I comment that out, I have no issues. This was supposed to fix #9995 and was fixed in #10054. Not sure if this was done incorrectly or some corresponding change needs to be made in the TypeScript parser. I don't know enough of how ESLint works so any info would be helpful.
The text was updated successfully, but these errors were encountered: