fundingValidity
Enforces that the
fundingproperty is valid.
✅ This rule is included in the package-json logical presets.
This rule checks that the funding property is a URL string, a funding object, or an array of URL strings and funding objects.
Funding objects should have non-empty type and url properties.
Examples
Section titled “Examples”{ "funding": "not-a-url"}{ "funding": { "type": "individual" }}{ "funding": "https://example.com/donate"}{ "funding": { "type": "individual", "url": "https://example.com/donate" }}{ "funding": [ "https://example.com/donate", { "type": "patreon", "url": "https://example.com/patreon" } ]}When Not To Use It
Section titled “When Not To Use It”If you don’t need compliance with npm’s funding field specification, you can disable this rule.
For example, if your package registry accepts a different funding metadata shape, this rule may not be correct for you.
Related Rules
Section titled “Related Rules”- fundingPresence - Enforces that the
fundingproperty is present.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
package-json/valid-funding
Made with ❤️🔥 around the world by
the Flint team and contributors.