-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
chore: enforce types imports #237
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think we can use this ESLint rule to enforce it properly: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-imports.md
I personally prefer the separate-type-imports
fixStyle
.
I added the |
This rule seems redundant with |
The import { type ReactElement } from 'react'; while it shouldn't. The |
Thanks for the explanation, it's a lot clearer. I think we can go ahed and add this new |
…ternational into ref/enforce-types-imports
Issues will be fixed with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
This PR, however small, adds the keyword 'type' to imports where possible.
I think it would be interesting to enable
verbatimModuleSyntax
as well.