packageManagerValidity
Enforces that the
packageManagerproperty is valid.
✅ This rule is included in the package-json logical presets.
This rule checks that the packageManager property is a string in name@version form.
Supported package manager names are npm, pnpm, yarn, bun, and deno.
The version should be a valid semver version.
Examples
Section titled “Examples”{ "packageManager": "pnpm"}{ "packageManager": "pip@1.2.3"}{ "packageManager": "pnpm@latest"}{ "packageManager": "pnpm@10.3.0"}{ "packageManager": "pnpm@10.3.0+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa"}{ "packageManager": "yarn@4.5.1"}When Not To Use It
Section titled “When Not To Use It”If you don’t need compliance with npm’s packageManager field specification, you can disable this rule.
For example, if your package manager uses non-semver release labels in this field, this rule may not be correct for you.
Related Rules
Section titled “Related Rules”- packageManagerPresence - Enforces that the
packageManagerproperty is present.
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.