# no-duplicate-imports

Rule `eslint/no-duplicate-imports`. Disallow duplicate module imports

- Source: eslint
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 2.1M weekly downloads of presets that enable it
- Trend: +151.7% last quarter
- Rank: #1513 by reach, #17 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `no-duplicate-imports` | no | no | package `eslint` | [docs](https://eslint.org/docs/latest/rules/no-duplicate-imports) |
| Oxlint | `no-duplicate-imports` | no | no | plugin `eslint`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-duplicate-imports.html) |

## Code examples

### Incorrect: the rule reports this

```js
import { merge } from 'module';
import something from 'another-module';
import { find } from 'module';
```

### Correct: the rule accepts this

```js
import { merge, find } from 'module';
import something from 'another-module';
```

```js
// not mergeable
import { merge } from 'module';
import * as something from 'module';
```

Examples from the ESLint documentation.

## Enable it

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

```js
export default [
  {
    rules: {
      "no-duplicate-imports": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "no-duplicate-imports": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |

## Related rules

- [eslint/id-match](https://lintradar.dev/rules/eslint/id-match.md): Require identifiers to match a specified regular expression
- [eslint/no-inline-comments](https://lintradar.dev/rules/eslint/no-inline-comments.md): Disallow inline comments after code
- [eslint/id-denylist](https://lintradar.dev/rules/eslint/id-denylist.md): Disallow specified identifiers
- [eslint/sort-vars](https://lintradar.dev/rules/eslint/sort-vars.md): Require variables within the same declaration block to be sorted
- [eslint/func-style](https://lintradar.dev/rules/eslint/func-style.md): Enforce the consistent use of either `function` declarations or expressions assigned to variables
- [eslint/require-await](https://lintradar.dev/rules/eslint/require-await.md): Disallow async functions which have no `await` expression

---

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