valid-devDependencies
💼 This rule is enabled in the following configs: ✅ recommended, 📦 recommended-publishable.
This rule uses package-json-validator to validate the devDependencies property, if present, against the following criteria:
- The value is an object
- Each property’s key is a valid package name
- Each property’s value is a valid version range
Examples
Section titled “Examples”{ "devDependencies": { "invalid-version": "catalob:" }}{ "devDependencies": { "david-bowie": "workspace:^", "nin": "catalog:", "thee-silver-mt-zion": "^1.2.3" }}Related Rules
Section titled “Related Rules”require-devDependencies- Enforces that thedevDependenciesproperty is present.