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

Re-enable import/no-duplicates for eslint once it supports import type #7

Closed
noahbrenner opened this issue Mar 4, 2020 · 1 comment

Comments

@noahbrenner
Copy link
Owner

Since import type ... is a recent addition to TypeScript, it's not yet supported by the import/no-duplicates eslint rule. This means that the following is currently reported as an error due to having multiple imports from the same package, even though one of the lines only imports types:

import {foo} from 'foo';
import type {FooType} from 'foo';

The rule already supports similar syntax for flow and there is an existing issue requesting the same support for Typescript: import-js/eslint-plugin-import#1667

In order to make use of the import type syntax, we had to temporarily disable this rule.

Once TypeScript import type support is added, we should re-enable the import/no-duplicates rule.

@noahbrenner
Copy link
Owner Author

This was fixed in #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant