eslint-config
eslint-config copied to clipboard
Indentation not normalized inside typescript generic type arguments
Describe the bug
In a typescript generic with multiline type arguments, indentation is not normalized.
That means, the following code is left as is:
export type A = NonNullable<
string
>
export type B = NonNullable<
string
>
Expected:
export type A = NonNullable<
string
>
export type B = NonNullable<
string
>
Reproduction
https://stackblitz.com/edit/stackblitz-starters-q3rvuw?file=test.ts
Run: pnpm eslint test.ts
You will see that the two interface fields are reported to be indented incorrectly, but the two generics are mistakenly considered to be fine.
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.18.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.14.0 - /usr/local/bin/pnpm
Used Package Manager
pnpm
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guide.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [X] The provided reproduction is a minimal reproducible of the bug.
You may want to report to https://github.com/eslint-stylistic/eslint-stylistic instead.