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

eslint rule: @typescript-eslint/consistent-type-imports #2229

Closed
bmingles opened this issue Sep 19, 2024 · 0 comments · Fixed by #2230
Closed

eslint rule: @typescript-eslint/consistent-type-imports #2229

bmingles opened this issue Sep 19, 2024 · 0 comments · Fixed by #2230
Assignees
Labels
enhancement New feature or request

Comments

@bmingles
Copy link
Contributor

bmingles commented Sep 19, 2024

We should configure @typescript-eslint/consistent-type-imports to enforce type only imports when appropriate.

UPDATE:
Context here is that I received a "Failed to resolve entry for package" error when importing types from a types only package (@deephaven-enterprise/jsapi-types). Since it doesn't have a true entry point, importing things without the type keyword caused the error since there is no index.js. The fix was to use type imports and seemed like a good general rule to force type imports when possible to avoid such scenarios.

@bmingles bmingles added enhancement New feature or request triage Issue requires triage labels Sep 19, 2024
@bmingles bmingles self-assigned this Sep 19, 2024
@bmingles bmingles removed the triage Issue requires triage label Sep 19, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Sep 19, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Sep 19, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Sep 19, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Sep 19, 2024
bmingles added a commit to bmingles/web-client-ui that referenced this issue Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant