Closed
Description
Repro
{
"rules": {
"@typescript-eslint/indent": "warn"
}
}
new Array<number>(
null,
null); // Works as expected
Array.from<number, number>(
[],
() => null); // Works as expected
new Array<() => number>(
null,
null); // Expected indentation of 8 spaces but found 12. (@typescript-eslint/indent)
Array.from<() => number, number>(
[],
() => null); // Expected indentation of 8 spaces but found 12. (@typescript-eslint/indent)
Array.from<number, () => number>(
[],
() => null); // Expected indentation of 8 spaces but found 12. (@typescript-eslint/indent)
Array.from<(number), number>(
[],
() => null); // Expected indentation of 8 spaces but found 12. (@typescript-eslint/indent)
Expected Result
No error should be reported in all cases.
Actual Result
In all cases where a generic contains parentheses a warning is issued.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
2.22.1-alpha.6 |
@typescript-eslint/parser |
2.22.0 |
TypeScript |
3.8.3 |
ESLint |
6.8.0 |
node |
v12.4.0 |
npm |
6.9.0 |