-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomerspackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
{
"rules": {
"@typescript-eslint/consistent-indexed-object-style": 1
}
}
interface A<B> {
[key: string]: B;
}
Expected Result
The interface cannot be changed into Record<string, B>
, as B then becomes undefined.
Actual Result
It becomes autofixed like this:
type A = Record<string, B>;
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
4.5.0 |
@typescript-eslint/parser |
4.5.0 |
TypeScript |
4.0.3 |
ESLint |
7.12.0 |
node |
15.0.1 |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomerspackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin