valid-bugs
💼 This rule is enabled in the following configs: ✅ recommended, 📦 recommended-publishable.
This rule uses package-json-validator to validate the bugs property, if present, against the following criteria:
- It must be either a
stringor anobject - If it’s a
string, it should be a valid URL - If it’s an
object, it should have eitheremailorurl(or both) emailshould be a valid email addressurlshould be a valid URL
Examples
Section titled “Examples”{ "bugs": "some@email.com"}{ "bugs": { "email": "support@nin.com", "url": "https://nin.com/support" }}Related Rules
Section titled “Related Rules”require-bugs- Enforces that thebugsproperty is present.