Skip to content
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

[consistent-type-imports] Regression 4.14.0/1 error when import used as key in type object #2989

Closed
3 tasks done
lukeapage opened this issue Feb 1, 2021 · 0 comments · Fixed by #2990
Closed
3 tasks done
Labels
bug Something isn't working good first issue Good for newcomers has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@lukeapage
Copy link

lukeapage commented Feb 1, 2021

  • 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-type-imports": "error"
  }
}
import type * as constants from './constants';

export type Y = {
    [constants.X]: ReadonlyArray<string>;
};

Expected Result

No error as in 4.13.0

Actual Result

error:

 1:1  error  Type import "constants" is used by decorator metadata  @typescript-eslint/consistent-type-imports

Versions

package version
@typescript-eslint/eslint-plugin 4.14.1
@typescript-eslint/parser 4.14.1
TypeScript 4.1.3
ESLint 7.19.0
node 12.16.0
@lukeapage lukeapage added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Feb 1, 2021
@bradzacher bradzacher added bug Something isn't working good first issue Good for newcomers and removed triage Waiting for maintainers to take a look labels Feb 1, 2021
bradzacher added a commit that referenced this issue Feb 1, 2021
@bradzacher bradzacher added the has pr there is a PR raised to close this label Feb 1, 2021
bradzacher added a commit that referenced this issue Feb 1, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
2 participants