valid-version
💼 This rule is enabled in the following configs: ✅ recommended, 📦 recommended-publishable.
This rule uses package-json-validator to validate the version property, if present, against the following criteria:
- It must be a string
- It should pass
semvervalidation
Examples
Section titled “Examples”{ "version": "1"}{ "version": "1.2.3"}Related Rules
Section titled “Related Rules”require-version- Enforces that theversionproperty is present.