# noRestrictedDependencies

Rule `biome/noRestrictedDependencies`. Disallow dependencies that are known to have better alternatives.

- Source: biome
- Technologies: JSON
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1934 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/noRestrictedDependencies` | no | no | group nursery, since 2.5.0 | [docs](https://biomejs.dev/linter/rules/no-restricted-dependencies/) |

## Code examples

### Incorrect: the rule reports this

```js
import glob from "globby";
```

```js
const glob = require("globby");
```

```js
const glob = await import("globby");
```

### Correct: the rule accepts this

```js
import glob from "tinyglobby";
```

```js
const glob = require("tinyglobby");
```

```js
const glob = await import("tinyglobby");
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noRestrictedDependencies": "error"
      }
    }
  }
}
```

## Related rules

- [biome/noReExportAll](https://lintradar.dev/rules/biome/noReExportAll.md): Avoid re-export all.
- [biome/noScssDeprecatedColorFunctions](https://lintradar.dev/rules/biome/noScssDeprecatedColorFunctions.md): Disallow the deprecated Sass functions that read one channel of a color.
- [biome/noReactPropAssignments](https://lintradar.dev/rules/biome/noReactPropAssignments.md): Disallow assigning to React component props.
- [biome/noSecrets](https://lintradar.dev/rules/biome/noSecrets.md): Disallow usage of sensitive data such as API keys and tokens.
- [biome/noReactNativeLiteralColors](https://lintradar.dev/rules/biome/noReactNativeLiteralColors.md): Disallow color literals in React Native styles.
- [biome/noSelfNestedLayer](https://lintradar.dev/rules/biome/noSelfNestedLayer.md): Disallow nesting a cascade layer inside a layer with the same name.

---

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