valid-contributors
💼 This rule is enabled in the following configs: ✅ recommended, 📦 recommended-publishable.
This rule uses package-json-validator to validate the contributors property, if present, against the following criteria:
- It must be an array of objects.
- Each object should have at least a
name, and optionallyemailandurl. email, if present, should be valid email address.url, if present, should be a valid URL.
Examples
Section titled “Examples”{ "contributors": "Trent Reznor"}{ "contributors": [ { "name": "Trent Reznor", "email": "treznor@nin.com", "url": "https://nin.com" } ]}Related Rules
Section titled “Related Rules”require-contributors- Enforces that thecontributorsproperty is present.