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

Allow mixed type-import-style #37

Open
FezVrasta opened this issue Mar 30, 2023 · 1 comment
Open

Allow mixed type-import-style #37

FezVrasta opened this issue Mar 30, 2023 · 1 comment

Comments

@FezVrasta
Copy link

I'd like to ensure no side effects are introduced by type imports, that means if I only import a type from a module, it should use the declaration syntax (import type { X } from 'y').

If I import a mix of types and normal exports from a module though, I don't care about this:

// this separation is not useful as the first import will run any module side effects.
import { X } from 'y';
import type { Z } from 'y';

Right now the type-import-style rule doesn't allow to specify this. Do you think it could be implemented?

@Brianzchen
Copy link
Member

If you use the declaration style doesn't that solve it already? Because import { a, type A } from 'blah' would already be banned.

I'm not quite sure I understand, but I'm happy for any contributions

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

2 participants