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

no-duplicates should ignore flow type imports #225

Closed
dmnd opened this issue Mar 22, 2016 · 2 comments · Fixed by #334
Closed

no-duplicates should ignore flow type imports #225

dmnd opened this issue Mar 22, 2016 · 2 comments · Fixed by #334

Comments

@dmnd
Copy link
Contributor

dmnd commented Mar 22, 2016

I'm using flow and no-duplicates triggers on:

import {someFunction} from '../src/foo';
import type {someType} from '../src/foo';

But as far as I know there's no way to import both types and other exports with the same line. no-duplicates should consider a flow type import as separate from a module export.

@benmosher
Copy link
Member

Ah, interesting. So no Lee Byron export-extensions-style sytax for Flow yet, then. 😉

I'm inclined to keep it simple and just recommend against using no-duplicates if the project contains flow types, but it seems like a reasonable use case so I would accept a PR that flags multiple type imports or multiple normal imports.

I'm not sure when I would have a chance to take a stab at this, though.

@dmnd
Copy link
Contributor Author

dmnd commented Mar 23, 2016

I'm not sure when I would have a chance to take a stab at this, though.

Totally not expecting/asking you to do this 👍

I mainly wanted to open the issue to track it. Who knows, maybe someone will be inspired to send a PR. Maybe that someone will be me if my flow-enabled project gets bigger...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants