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.
Examples
Section titled “Examples”{ "bin": { "invalid-bin": 123 }}{ "bin": "./bin/cli.js"}{ "bin": { "my-cli": "./bin/cli.js" }}Related Rules
Section titled “Related Rules”require-bin- Enforces that thebinproperty is present.