# noUnusedImports

Rule `biome/noUnusedImports`. Disallow unused imports.

- Source: biome
- Technologies: Imports
- Kind: correctness
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #575 by reach, #210 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `correctness/noUnusedImports` | yes | unsafe | group correctness, since 1.3.0 | [docs](https://biomejs.dev/linter/rules/no-unused-imports/) |

## Code examples

### Incorrect: the rule reports this

```js
import A from 'mod';
```

```js
import * as A from 'mod';
```

```ts
import { type A, B } from 'mod';

export { B }
```

### Correct: the rule accepts this

```ts
import { A, type B } from 'mod';

function f(arg: B): A {
    return new A(arg);
}
```

```ts
import type {} from '@mui/lab/themeAugmentation';
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "correctness": {
        "noUnusedImports": "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% |

## Related rules

- [biome/noUnusedFunctionParameters](https://lintradar.dev/rules/biome/noUnusedFunctionParameters.md): Disallow unused function parameters.
- [biome/noUselessContinue](https://lintradar.dev/rules/biome/noUselessContinue.md): Avoid using unnecessary `continue`.
- [biome/noUnsafeIframeSandbox](https://lintradar.dev/rules/biome/noUnsafeIframeSandbox.md): Disallow an unsafe combination of the `sandbox` attribute.
- [biome/noUselessEscapeInString](https://lintradar.dev/rules/biome/noUselessEscapeInString.md): Disallow unnecessary escapes in string literals.
- [biome/noUnmatchableAnbSelector](https://lintradar.dev/rules/biome/noUnmatchableAnbSelector.md): Disallow `An+B` formulas that cannot select an element.
- [biome/noUselessReExportAll](https://lintradar.dev/rules/biome/noUselessReExportAll.md): Disallow `export * from` a module that has no named exports.

---

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