From c096a3f826a9e3ebc30211b7e7439b4a0d377d3b Mon Sep 17 00:00:00 2001 From: Luiz Ferraz Date: Wed, 21 Jan 2026 10:40:12 -0300 Subject: [PATCH] Add consistent type imports rule --- src/configs/typescript.ts | 1 + src/rules/min-chained-call-depth/index.ts | 3 ++- src/rules/parameter-destructuring/index.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/configs/typescript.ts b/src/configs/typescript.ts index ee512df..524903b 100644 --- a/src/configs/typescript.ts +++ b/src/configs/typescript.ts @@ -71,6 +71,7 @@ const baseRules: Linter.RulesRecord = { 'no-undef': 'off', '@typescript-eslint/no-namespace': 'off', '@typescript-eslint/restrict-template-expressions': 'off', + '@typescript-eslint/consistent-type-imports': 'error', // Disable rules that turn `any` into `unknown`, places where `unknown` is the preferred type // have that type already. diff --git a/src/rules/min-chained-call-depth/index.ts b/src/rules/min-chained-call-depth/index.ts index 891ddf1..8af0fd2 100644 --- a/src/rules/min-chained-call-depth/index.ts +++ b/src/rules/min-chained-call-depth/index.ts @@ -1,4 +1,5 @@ -import {AST_TOKEN_TYPES, AST_NODE_TYPES, TSESTree} from '@typescript-eslint/utils'; +import type {TSESTree} from '@typescript-eslint/utils'; +import {AST_TOKEN_TYPES, AST_NODE_TYPES} from '@typescript-eslint/utils'; import {isCommentToken} from '@typescript-eslint/utils/ast-utils'; import {createRule} from '../createRule'; diff --git a/src/rules/parameter-destructuring/index.ts b/src/rules/parameter-destructuring/index.ts index 2d5f7a3..14c7680 100644 --- a/src/rules/parameter-destructuring/index.ts +++ b/src/rules/parameter-destructuring/index.ts @@ -1,5 +1,5 @@ import {AST_NODE_TYPES} from '@typescript-eslint/utils'; -import {RuleFix} from '@typescript-eslint/utils/ts-eslint'; +import type {RuleFix} from '@typescript-eslint/utils/ts-eslint'; import {createRule} from '../createRule'; export const parameterDestructuring = createRule({