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

Consider @typescript-eslint/consistent-type-exports and @typescript-eslint/consistent-type-imports #97

Open
amannn opened this issue Dec 13, 2023 · 0 comments

Comments

@amannn
Copy link
Member

amannn commented Dec 13, 2023

See https://typescript-eslint.io/blog/consistent-type-imports-and-exports-why-and-how/ for details.

Both rules have autofix for the inline option.

Or:

  • verbatimModuleSyntax in tsconfig.json (makes @typescript-eslint/consistent-type-exports and @typescript-eslint/consistent-type-imports obsolete)
  • @typescript-eslint/no-import-type-side-effects
  • "import/no-duplicates": ["error", {"prefer-inline": true}]

However: verbatimModuleSyntax doesn't seem to work well with export default {type} (microsoft/TypeScript#41409). Maybe due to this, consistent-type-imports is the better choice?

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

1 participant