Skip to content

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

@bmingles

Description

@bmingles

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions