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

Check duplicates for normal imports and flow type imports separately #334

Merged

Conversation

sgtpepper43
Copy link
Contributor

Fix #225

If import is a flow type import, add to separate map for duplicate checking.

@sgtpepper43
Copy link
Contributor Author

The travis ci build failed because nvm install 5 timed out. Probably just needs to be restarted.

@benmosher
Copy link
Member

Thanks! 😄

@benmosher benmosher merged commit 2ba7fd5 into import-js:master May 13, 2016
@dmnd
Copy link
Contributor

dmnd commented May 13, 2016

Nice, thanks!

@mizchi
Copy link

mizchi commented Feb 18, 2017

I encountered alike problem on import/named.

import type { Connector } from 'react-redux'

https://github.com/flowtype/flow-typed/blob/master/definitions/npm/react-redux_v5.x.x/flow_v0.30.x-/react-redux_v5.x.x.js#L33-L36

Connector is just a type on definition file but there is no instance.

@fabiomcosta
Copy link

:/
Too bad this wasn't introduced with an option to disable this behavior.
You can import types and other things with the same import with:

import defaultNamed, { named, typed namedType } from './module';

This is fine as the default, but it would be nice to provide an option to keep the previous behavior.

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

Successfully merging this pull request may close these issues.

no-duplicates should ignore flow type imports
5 participants