noDuplicateDependencies
Это содержимое пока не доступно на вашем языке.
Summary
Section titled “Summary”- Rule available since:
v2.2.4
- Diagnostic Category:
lint/nursery/noDuplicateDependencies
- This rule doesn’t have a fix.
- The default severity of this rule is information.
- Sources:
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "noDuplicateDependencies": "error" } } }}
Description
Section titled “Description”Prevent the listing of duplicate dependencies. The rule supports the following dependency groups: “bundledDependencies”, “bundleDependencies”, “dependencies”, “devDependencies”, “overrides”, “optionalDependencies”, and “peerDependencies”.
Dependencies are not allowed to be listed twice under the same dependency group.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”{ "dependencies": { "foo": "1.0.0", "foo": "2.0.0" }}
{ "bundleDependencies": ["foo", "foo"]}
{ "dependencies": { "foo": "2.0.0" }}
{ "bundleDependencies": ["foo"]}
Some dependency group dependencies are checked against other dependency groups;
- Dependencies listed in “dependencies” cannot be listed under “devDependencies”, “optionalDependencies” or “peerDependencies”.
- Dependencies listed in “optionalDependencies” cannot be listed under “peerDependencies” (and vice versa).
Dependencies listed in “devDependencies” are allowed to be listed in “optionalDependencies” or “peerDependencies”. And dependencies listed in “overrides” & “bundleDependencies” are not checked against other dependency groups.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”{ "dependencies": { "foo": "1.0.0" }, "devDependencies": { "foo": "1.0.0" }}
{ "dependencies": { "foo": "1.0.0" }}
Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.