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

docs(eslint-plugin): [consistent-type-imports] note that it can't be used for decorator metadata #2716

Merged
merged 1 commit into from
Nov 1, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/eslint-plugin/docs/rules/consistent-type-imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@ const x: import('Bar') = 1;
## When Not To Use It

- If you are not using TypeScript 3.8 (or greater), then you will not be able to use this rule, as type-only imports are not allowed.
- Certain libraries use the non-inlined imports to infer information about the variables. For example, for dependency injection.
type-only imports cannot be used with these libraries. See [#2559](https://github.com/typescript-eslint/typescript-eslint/issues/2559#issuecomment-692780580)
- If you specifically want to use both import kinds for stylistic reasons, you can disable this rule.