Skip to content

noRestrictedDependencies (JavaScript)

biome.json
{
"linter": {
"rules": {
"nursery": {
"noRestrictedDependencies": "error"
}
}
}
}

Disallow dependencies that are known to have better alternatives.

This rule checks static imports, dynamic import(), and require() calls and suggests modern, native, or more maintainable alternatives based on e18e’s replacement data.

import glob from "globby";
code-block.js:1:18 lint/nursery/noRestrictedDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use of the restricted dependency globby detected.

> 1 │ import glob from "globby";
^^^^^^^^
2 │

The dependency might be old, not actively maintained, or there's a native alternative.

The following replacement is suggested:
- Replace with the alternative: tinyglobby.

Read more: https://e18e.dev/docs/replacements/globby

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

const glob = require("globby");
code-block.js:1:22 lint/nursery/noRestrictedDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use of the restricted dependency globby detected.

> 1 │ const glob = require("globby");
^^^^^^^^
2 │

The dependency might be old, not actively maintained, or there's a native alternative.

The following replacement is suggested:
- Replace with the alternative: tinyglobby.

Read more: https://e18e.dev/docs/replacements/globby

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

const glob = await import("globby");
code-block.js:1:27 lint/nursery/noRestrictedDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use of the restricted dependency globby detected.

> 1 │ const glob = await import("globby");
^^^^^^^^
2 │

The dependency might be old, not actively maintained, or there's a native alternative.

The following replacement is suggested:
- Replace with the alternative: tinyglobby.

Read more: https://e18e.dev/docs/replacements/globby

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

import glob from "tinyglobby";
const glob = require("tinyglobby");
const glob = await import("tinyglobby");

See the e18e docs for the full list of replacements.