binPresence
Enforces that the
binproperty is present.
✅ This rule is included in the package-json preset.
npm requires that the bin field in package.json is present.
Examples
Section titled “Examples”{}{ "name": "my-repository"}{ "bin": "./lib/index.js"}{ "bin": "./lib/index.js", "name": "my-repository"}Options
Section titled “Options”ignorePrivate
Section titled “ignorePrivate”Whether the property should still be required when the package’s private property is true.
Defaults to false.
This option can be useful if the rule is enabled on many package.json files and some files differ in privacy.
When Not To Use It
Section titled “When Not To Use It”If your package doesn’t need to specify a bin, you can disable this rule.
Related Rules
Section titled “Related Rules”- binValidity - Enforces that the
binproperty is valid.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
package-json/require-bin
Made with ❤️🔥 around the world by
the Flint team and contributors.