Skip to content

Commit 760a6c5

Browse files
authored
Add consistent type imports rule (#484)
1 parent a42eea2 commit 760a6c5

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/configs/typescript.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ const baseRules: Linter.RulesRecord = {
7171
'no-undef': 'off',
7272
'@typescript-eslint/no-namespace': 'off',
7373
'@typescript-eslint/restrict-template-expressions': 'off',
74+
'@typescript-eslint/consistent-type-imports': 'error',
7475

7576
// Disable rules that turn `any` into `unknown`, places where `unknown` is the preferred type
7677
// have that type already.

src/rules/min-chained-call-depth/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import {AST_TOKEN_TYPES, AST_NODE_TYPES, TSESTree} from '@typescript-eslint/utils';
1+
import type {TSESTree} from '@typescript-eslint/utils';
2+
import {AST_TOKEN_TYPES, AST_NODE_TYPES} from '@typescript-eslint/utils';
23
import {isCommentToken} from '@typescript-eslint/utils/ast-utils';
34
import {createRule} from '../createRule';
45

src/rules/parameter-destructuring/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {AST_NODE_TYPES} from '@typescript-eslint/utils';
2-
import {RuleFix} from '@typescript-eslint/utils/ts-eslint';
2+
import type {RuleFix} from '@typescript-eslint/utils/ts-eslint';
33
import {createRule} from '../createRule';
44

55
export const parameterDestructuring = createRule({

0 commit comments

Comments
 (0)