Skip to content

valid-bin

💼 This rule is enabled in the following configs: ✅ recommended, 📦 recommended-publishable.

This rule uses package-json-validator to validate the bin property, if present, against the following criteria:

  • It must be either a non-empty string or an object.
  • If the value is an object, it should only consist of non-empty string values.
{
"bin": {
"invalid-bin": 123
}
}
  • require-bin - Enforces that the bin property is present.