noRestrictedDependencies (JSON)
Summary
Section titled “Summary”- Rule available since:
v2.5.0 - Diagnostic Category:
lint/nursery/noRestrictedDependencies - This rule doesn’t have a fix.
- The default severity of this rule is information.
- Sources:
- Same as
e18e/ban-dependencies
- Same as
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "noRestrictedDependencies": "error" } } }}Description
Section titled “Description”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.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”{ "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.
{ "dependencies": { "tinyglobby": "x.x.x" }}See the e18e docs for the full list of replacements.
Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.