Skip to content

noRestrictedDependencies

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

Disallow dependencies that are known to have better alternatives.

This rule checks dependencies and devDependencies in package.json against e18e’s replacement data and suggests modern, native, or more maintainable alternatives.

package.json
{
"dependencies": {
"globby": "x.x.x"
}
}
/package.json:3:5 lint/nursery/noRestrictedDependencies ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use of the restricted dependency globby detected.

1 │ {
2 │ “dependencies”: {
> 3 │ “globby”: “x.x.x”
^^^^^^^^
4 │ }
5 │ }

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.

package.json
{
"dependencies": {
"tinyglobby": "x.x.x"
}
}

See the e18e docs for the full list of replacements.