Skip to content

[consistent-indexed-object-style] autofix deletes extended interfaces #3007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
tao-cumplido opened this issue Feb 6, 2021 · 0 comments · Fixed by #3009
Closed
3 tasks done

[consistent-indexed-object-style] autofix deletes extended interfaces #3007

tao-cumplido opened this issue Feb 6, 2021 · 0 comments · Fixed by #3009
Labels
bug Something isn't working has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@tao-cumplido
Copy link

  • 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": ["error", "record"]
  }
}
interface A {
  a: unknown;
}

interface B extends A {
  [index: number]: unknown;
}

Expected Result

no change

Actual Result

interface A {
  a: unknown;
}

type B = Record<number, unknown>;

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 4.14.2
@typescript-eslint/parser 4.14.2
TypeScript 4.1.3
ESLint 7.19.0
node 14.15.4
@tao-cumplido tao-cumplido added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for team members to take a look labels Feb 6, 2021
@bradzacher bradzacher added bug Something isn't working good first issue Good for newcomers and removed triage Waiting for team members to take a look labels Feb 6, 2021
@armano2 armano2 self-assigned this Feb 7, 2021
@armano2 armano2 added has pr there is a PR raised to close this and removed good first issue Good for newcomers labels Feb 7, 2021
@armano2 armano2 removed their assignment Feb 13, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
3 participants