Skip to content

bugsValidity

Enforces that the bugs property 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.

{
"bugs": "not-a-url"
}
{
"bugs": {
"extra": true,
"email": "name@example.com"
}
}

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.

  • bugsPresence - Enforces that the bugs property is present.
Made with ❤️‍🔥 around the world by the Flint team and contributors.