valid-packageManager
💼 This rule is enabled in the following configs: ✅ recommended, 📦 recommended-publishable.
This rule uses package-json-validator to validate the packageManager property, if present, against the following criteria:
- It should have a string value
- It should be in the form
"packageManager@version" - The
packageManagerportion should be one ofnpm,pnpm,yarn,bun, ordeno - The
versionportion should be a full semver version number, optionally followed by a sha hash for that version
Examples
Section titled “Examples”{ "packageManager": "pnpm@>=10"}{ "packageManager": "pnpm@10.3.0"}{ "packageManager": "pnpm@10.3.0+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa"}Related Rules
Section titled “Related Rules”require-packageManager- Enforces that thepackageManagerproperty is present.