Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
let a: Uint8Array<ArrayBufferLike> = new Uint8Array();
void a;
ESLint Config
{
"rules": {
"@typescript-eslint/consistent-generic-constructors": "error"
}
}
tsconfig
Expected Result
Either don't report the error, or don't generate invalid code upon fix.
Actual Result
Rule reports error:
The generic type arguments should be specified as part of the constructor type arguments. 1:5 - 1:54
If I tap Fix, the code becomes:
let a = new Uint8Array<ArrayBufferLike>();
void a;
And then TypeScript reports error:
2554: Expected 1-3 arguments, but got 0. 1:9 - 1:42
Additional Info
If I enable two rules consistent-generic-constructors and no-unnecessary-type-arguments, playground, both rules would report errors.
The outcome depends on the order of fix.
- If consistent-generic-constructors is fixed first, the above problem occurs.
- If no-unnecessary-type-arguments is fixed first, the resulting code is well-formed.
Metadata
Metadata
Assignees
Labels
Go ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issueSomething isn't workingSomething isn't workingIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin