-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Request: option to let no-duplicates
force type & normal imports to be de-duplicated
#909
Comments
this should be optional |
I agree this should be controlled by an option. |
Some progress? |
@loyd not til somebody submits a PR ¯\_(ツ)_/¯ |
Regular imports and type imports can be merged in TypeScript as well by the same logic. The difference with flow is that in TypeScript, the type imports will look like regular imports. import {someFunction} from '../src/foo';
import type {someType} from '../src/foo'; becomes import {someFunction, someType} from '../src/foo'; |
TypeScript 4.5 also supports inline |
We'd probably have to detect TS version regardless to support that, and we may want it to be a separate option. Let's explore it in #2229. |
any progress in this? |
I'd assume somebody picking up #2229 would be welcome, so I suggest starting there 🙂 |
#225 asked to allow both type & normal imports to be allowed together, e.g.
This was requested because according to the author there was no way to merge these together at that point in time.
However, currently flow does support merging these imports together:
I think it would therefore be useful if
no-duplicates
could be configured to have the same behaviour as before #225, i.e. to require type & normal imports to be merged.The text was updated successfully, but these errors were encountered: