licensePresence
Enforces that the
licenseproperty is present.
✅ This rule is included in the package-json logical presets.
This rule checks that the license property is present.
Examples
Section titled “Examples”{}{ "name": "my-repository"}{ "license": "GPL-3.0-only"}{ "license": "GPL-3.0-only", "name": "my-repository"}Options
Section titled “Options”ignorePrivate
Section titled “ignorePrivate”Whether the property should still be required when the package’s private property is true.
Defaults to true.
This option can be useful if the rule is enabled on many package.json files and some files differ in privacy.
When Not To Use It
Section titled “When Not To Use It”If your package doesn’t need to specify a license, you can disable this rule. For example, if your package is local-only and is never published online or made open source, licensing may not be relevant for you.
Related Rules
Section titled “Related Rules”- licenseValidity - Enforces that the
licenseproperty is valid.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
package-json/require-license
Made with ❤️🔥 around the world by
the Flint team and contributors.