packageManagerPresence
Enforces that the
packageManagerproperty is present.
✅ This rule is included in the package-json preset.
This rule requires the packageManager field in package.json to be present.
Examples
Section titled “Examples”{}{ "name": "my-repository"}{ "packageManager": "pnpm@10.3.0"}{ "name": "my-repository", "packageManager": "pnpm@10.3.0"}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 does not need to pin the package manager used to work on it, you can disable this rule. For example, a package maintained in an environment that already enforces one package manager may not need this field.
Related Rules
Section titled “Related Rules”- packageManagerValidity - Enforces that the
packageManagerproperty is valid.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”
Made with ❤️🔥 around the world by
the Flint team and contributors.