bugsValidity
Enforces that the
bugsproperty is valid.
✅ This rule is included in the package-json logical presets.
This rule checks that the bugs property is either a URL string or an object with email and / or url properties.
If url is present, it should be a valid URL.
If email is present, it should be a string.
Examples
Section titled “Examples”{ "bugs": "not-a-url"}{ "bugs": { "extra": true, "email": "name@example.com" }}{ "bugs": "https://example.com/issues"}{ "bugs": { "email": "name@example.com", "url": "https://example.com/issues" }}When Not To Use It
Section titled “When Not To Use It”If you don’t need compliance with npm’s bugs field specification, you can disable this rule.
For example, if you use a package registry that accepts additional bug metadata properties, this rule may not be correct for you.
Related Rules
Section titled “Related Rules”- bugsPresence - Enforces that the
bugsproperty is present.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
package-json/valid-bugs
Made with ❤️🔥 around the world by
the Flint team and contributors.