licenseValidity
Enforces that the
licenseproperty is valid.
✅ This rule is included in the package-json logical presets.
This rule checks that the license property is a string containing 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"}When Not To Use It
Section titled “When Not To Use It”If you don’t need compliance with npm’s license 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”- licensePresence - Enforces that the
licenseproperty is present.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
package-json/valid-license
Made with ❤️🔥 around the world by
the Flint team and contributors.