Skip to content

chore(lint): enable @typescript-eslint/consistent-type-imports#30

Open
tupe12334 wants to merge 1 commit into
mainfrom
lint/enable-consistent-type-imports
Open

chore(lint): enable @typescript-eslint/consistent-type-imports#30
tupe12334 wants to merge 1 commit into
mainfrom
lint/enable-consistent-type-imports

Conversation

@tupe12334

Copy link
Copy Markdown
Member

Closes #29

Summary

Enables the @typescript-eslint/consistent-type-imports ESLint rule (error) for src/**/*.{ts,tsx} via a focused override in eslint.config.mjs.

The rule requires type-only imports to use the import type { ... } form, which lets the TypeScript compiler fully elide them from emitted JS — avoiding accidental runtime imports/side effects and improving isolatedModules/bundler behavior.

Changes

  • eslint.config.mjs: add typeImportsOverride enabling the single rule.

Verification

  • The codebase already follows this convention → 0 new violations.
  • pnpm run lint — passes.
  • pnpm run build — passes.

No other rules touched. No production code changes.


This pull request was opened by the "Add lint rule → issue + PR (owned repos + my orgs) → Slack" routine of moadim.

Enforce `import type` for type-only imports. The codebase already follows
this convention, so this locks in the pattern and prevents regressions —
zero new violations. Type-only imports get fully elided from emitted JS,
avoiding accidental runtime imports and improving bundler/isolatedModules
behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Enable @typescript-eslint/consistent-type-imports lint rule

1 participant