From 57955b6fb037b1b8a9d1c5ff30beac1c8e6d831f Mon Sep 17 00:00:00 2001 From: tupe12334 Date: Thu, 18 Jun 2026 02:27:20 +0300 Subject: [PATCH] chore(lint): enable @typescript-eslint/consistent-type-imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- eslint.config.mjs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 71732a6..f040632 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -8,4 +8,15 @@ const urlConstantsOverride = { }, }; -export default [...config, urlConstantsOverride]; +// Enforce `import type` for type-only imports so the TypeScript compiler can +// fully elide them from the emitted JavaScript. Keeps type and value imports +// distinct, avoids accidental runtime imports / side effects, and plays well +// with bundlers and `isolatedModules`. +const typeImportsOverride = { + files: ["src/**/*.{ts,tsx}"], + rules: { + "@typescript-eslint/consistent-type-imports": "error", + }, +}; + +export default [...config, urlConstantsOverride, typeImportsOverride];