Skip to content

Comments

chore: enforce consistent type imports and exports#2842

Merged
cdklabs-automation merged 1 commit into10.xfrom
mrgrain/chore/types-imports-exports
Feb 2, 2026
Merged

chore: enforce consistent type imports and exports#2842
cdklabs-automation merged 1 commit into10.xfrom
mrgrain/chore/types-imports-exports

Conversation

@mrgrain
Copy link
Contributor

@mrgrain mrgrain commented Feb 2, 2026

This change adds ESLint rules to enforce consistent use of type-only imports and exports across the codebase.

Using import type and export type syntax improves code clarity by making it explicit when an import is only used for type information. This distinction helps TypeScript's isolatedModules mode and enables better tree-shaking in bundlers, as type-only imports are completely erased during compilation.

The rules are configured via projen and applied to all source and test files.

Add ESLint rules for @typescript-eslint/consistent-type-exports and
@typescript-eslint/consistent-type-imports to improve code clarity
and enable better tree-shaking by distinguishing type-only imports.
@cdklabs-automation cdklabs-automation added this pull request to the merge queue Feb 2, 2026
Merged via the queue into 10.x with commit 8bfbd10 Feb 2, 2026
14 checks passed
@cdklabs-automation cdklabs-automation deleted the mrgrain/chore/types-imports-exports branch February 2, 2026 12:01
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

Successfully merging this pull request may close these issues.

3 participants