# no-deprecated

Rule `import/no-deprecated`. Forbid imported names marked with `@deprecated` documentation tag.

- Source: import
- Technologies: Imports
- Kind: suspicious
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1734 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `import/no-deprecated` | no | no | package `eslint-plugin-import` | [docs](https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/no-deprecated.md) |
| Biome | `suspicious/noDeprecatedImports` | no | no | group suspicious, since 2.2.5 | [docs](https://biomejs.dev/linter/rules/no-deprecated-imports/) |

## Code examples

### Incorrect: the rule reports this

```js
import { oldUtility } from "./utils.js";
```

```js
/**
 * @deprecated
 */
export function oldUtility() {}
```

### Correct: the rule accepts this

```js
import { newUtility, oldUtility } from "./utils.js";
```

```js
export function newUtility() {}

// @deprecated (this is not a JSDoc comment)
export function oldUtility() {}
```

Examples from the Biome documentation.

## Enable it

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

```js
import importPlugin from "eslint-plugin-import";

export default [
  {
    plugins: { import: importPlugin },
    rules: {
      "import/no-deprecated": "error",
    },
  },
];
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "noDeprecatedImports": "error"
      }
    }
  }
}
```

## Related rules

- [react/no-deprecated](https://lintradar.dev/rules/react/no-deprecated.md): Disallow usage of deprecated methods
- [typescript/no-deprecated](https://lintradar.dev/rules/typescript/no-deprecated.md): Disallow using code marked as `@deprecated`
- [import/enforce-node-protocol-usage](https://lintradar.dev/rules/import/enforce-node-protocol-usage.md): Enforce either using, or omitting, the `node:` protocol when importing Node.js builtin modules.
- [import/unambiguous](https://lintradar.dev/rules/import/unambiguous.md): Forbid potentially ambiguous parse goal (`script` vs. `module`).
- [import/no-relative-parent-imports](https://lintradar.dev/rules/import/no-relative-parent-imports.md): Forbid importing modules from parent directories.
- [import/no-namespace](https://lintradar.dev/rules/import/no-namespace.md): Forbid namespace (a.k.a. "wildcard" `*`) imports.

---

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