valid-license
💼 This rule is enabled in the following configs: ✅ recommended, 📦 recommended-publishable.
This rule uses package-json-validator to validate the license property, if present, against the following criteria:
- It must be a
string - The value should be a valid SPDX license, “UNLICENSED”, or a note referencing a license file (e.g. “SEE LICENSE IN LICENSE.md”)
Examples
Section titled “Examples”{ "license": "GPL3"}{ "license": "GPL-3.0-only"}Related Rules
Section titled “Related Rules”require-license- Enforces that thelicenseproperty is present.