# consistent-type-imports

Rule `typescript/consistent-type-imports`. Enforce consistent usage of type imports

- Source: typescript
- Technologies: TypeScript
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 32.7M weekly downloads of presets that enable it
- Trend: +103.6% last quarter
- Rank: #462 by reach, #263 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `@typescript-eslint/consistent-type-imports` | no | safe | package `@typescript-eslint/eslint-plugin` | [docs](https://typescript-eslint.io/rules/consistent-type-imports) |
| Oxlint | `typescript/consistent-type-imports` | no | safe | plugin `typescript`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/typescript/consistent-type-imports.html) |
| Biome | `style/useImportType` | yes | safe | group style, since 1.5.0 | [docs](https://biomejs.dev/linter/rules/use-import-type/) |

## Code examples

### Incorrect: the rule reports this

```ts
import { Foo } from 'Foo';
import Bar from 'Bar';
type T = Foo;
const x: Bar = 1;
```

```ts
type T = import('Foo').Foo;
const x: import('Bar') = 1;
```

### Correct: the rule accepts this

```ts
import type { Foo } from 'Foo';
import type Bar from 'Bar';
type T = Foo;
const x: Bar = 1;
```

```ts
import { type Foo } from 'Foo';
import type Bar from 'Bar';
type T = Foo;
const x: Bar = 1;
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import tseslint from "typescript-eslint";

export default [
  {
    plugins: { "@typescript-eslint": tseslint.plugin },
    rules: {
      "@typescript-eslint/consistent-type-imports": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "typescript/consistent-type-imports": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "style": {
        "useImportType": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |
| [Nuxt](https://lintradar.dev/presets/nuxt.md) | ESLint | `@nuxt/eslint-config` | 188 | 1.5M | +72.8% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |
| [Alloy](https://lintradar.dev/presets/alloy.md) | ESLint | `eslint-config-alloy` | 166 | 31.4K | +32.4% |

## Related rules

- [typescript/consistent-type-exports](https://lintradar.dev/rules/typescript/consistent-type-exports.md): Enforce consistent usage of type exports
- [typescript/prefer-string-starts-ends-with](https://lintradar.dev/rules/typescript/prefer-string-starts-ends-with.md): Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings
- [typescript/switch-exhaustiveness-check](https://lintradar.dev/rules/typescript/switch-exhaustiveness-check.md): Require switch-case statements to be exhaustive
- [typescript/prefer-optional-chain](https://lintradar.dev/rules/typescript/prefer-optional-chain.md): Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects
- [typescript/ban-types](https://lintradar.dev/rules/typescript/ban-types.md): This rule bans specific types and can suggest alternatives. Note that it does not ban the corresponding runtime objects from being used.
- [typescript/require-await](https://lintradar.dev/rules/typescript/require-await.md): Disallow async functions which do not return promises and have no `await` expression

---

Web page: https://lintradar.dev/rules/typescript/consistent-type-imports. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
