Closed Yovach closed 10 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
next-international | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 11, 2023 0:35am |
I added the separate-type-imports
rule to eslint
config and tried to add a rule to enforce the top-level type
but you have to install a new dependency (https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.md#prefer-top-level) :/
tried to add a rule to enforce the top-level type but you have to install a new dependency (import-js/eslint-plugin-import@main/docs/rules/consistent-type-specifier-style.md#prefer-top-level) :/
This rule seems redundant with @typescript-eslint/consistent-type-imports
, I'm not sure to understand the difference between the two?
tried to add a rule to enforce the top-level type but you have to install a new dependency (import-js/eslint-plugin-import@main/docs/rules/consistent-type-specifier-style.md#prefer-top-level) :/
This rule seems redundant with
@typescript-eslint/consistent-type-imports
, I'm not sure to understand the difference between the two?
The @typescript-eslint/consistent-type-imports
allows us to use
import { type ReactElement } from 'react';
while it shouldn't.
The import/consistent-type-specifier-style
prevents this
Thanks for the explanation, it's a lot clearer. I think we can go ahed and add this new eslint-plugin-import
package along with this other rule.
Issues will be fixed with --fix
thanks to import/consistent-type-specifier-style
This PR, however small, adds the keyword 'type' to imports where possible.
I think it would be interesting to enable
verbatimModuleSyntax
as well.