# noDuplicateDependencies

Rule `biome/noDuplicateDependencies`. Disallow duplicate dependencies in `package.json`.

- Source: biome
- Technologies: JSON
- Kind: suspicious
- Needs type information: no
- Autofix: no
- Reach: 2.1M weekly downloads of presets that enable it
- Trend: +151.7% last quarter
- Rank: #1537 by reach, #41 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `suspicious/noDuplicateDependencies` | no | no | group suspicious, since 2.2.4 | [docs](https://biomejs.dev/linter/rules/no-duplicate-dependencies/) |

## Code examples

### Incorrect: the rule reports this

```json
{
    "dependencies": {
        "foo": "1.0.0",
        "foo": "2.0.0"
    }
}
```

```json
{
    "bundleDependencies": ["foo", "foo"]
}
```

### Correct: the rule accepts this

```json
{
    "dependencies": {
        "foo": "2.0.0"
    }
}
```

```json
{
    "bundleDependencies": ["foo"]
}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

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

## Presets that enable it

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

## Related rules

- [biome/noDuplicateGraphqlOperationName](https://lintradar.dev/rules/biome/noDuplicateGraphqlOperationName.md): Require unique operation names within a GraphQL document.
- [biome/noDuplicateSelectors](https://lintradar.dev/rules/biome/noDuplicateSelectors.md): Disallow duplicate selectors.
- [biome/noEmptyObjectKeys](https://lintradar.dev/rules/biome/noEmptyObjectKeys.md): Disallow empty keys in JSON objects.
- [biome/noEnum](https://lintradar.dev/rules/biome/noEnum.md): Disallow TypeScript enum.
- [biome/noEvolvingTypes](https://lintradar.dev/rules/biome/noEvolvingTypes.md): Disallow variables from evolving into `any` type through reassignments.
- [biome/noExportedImports](https://lintradar.dev/rules/biome/noExportedImports.md): Disallow exporting an imported variable.

---

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