devDependenciesValidity
Enforces that the
devDependenciesproperty is valid.
✅ This rule is included in the package-json logical presets.
The rule checks that, if present, the devDependencies property is an object where each key is a valid package name and each value is a valid version range.
Examples
Section titled “Examples”{ "devDependencies": { "invalid-version": "catalob:" }}{ "devDependencies": { "first": "catalog:", "thee-"first"": "^1.2.3", "david-bowie": "*" }}When Not To Use It
Section titled “When Not To Use It”If you don’t need compliance with npm’s devDependencies field specification, you can disable this rule.
For example, if you use a different package manager that treats the field differently, this rule may not be correct for you.
Related Rules
Section titled “Related Rules”- devDependenciesPresence - Enforces that the
devDependenciesproperty is present.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”
Made with ❤️🔥 around the world by
the Flint team and contributors.