Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

no-duplicate-imports rule triggered for import type statements #293

Closed
elliottsj opened this issue Apr 13, 2016 · 2 comments
Closed

no-duplicate-imports rule triggered for import type statements #293

elliottsj opened this issue Apr 13, 2016 · 2 comments

Comments

@elliottsj
Copy link

eslint recently introduced a 'no-duplicate-imports' rule which is triggered if there are two or more import statements from the same module.

It seems that this rule is also triggered for import type Flow statements, e.g. this results in an error:

import { foo } from 'someModule';
import type { Bar } from 'someModule';

afaik, there's no way to combine these two statements into one import statement. Would this be an issue with babel-eslint since it provides the Flow syntax support?

@danez
Copy link
Member

danez commented Apr 21, 2016

The rule is not differentiating between type and regular imports and sadly babel-eslint can't do anything about that as far as I can see. Probably this rule is a good candidate for adding to https://github.com/babel/eslint-plugin-babel and adjusting it to differ between these two import types.

@nicolo-ribaudo
Copy link
Member

Closing in favor of babel/eslint-plugin-babel#59

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

No branches or pull requests

3 participants