valid-packageManager
💼 This rule is enabled in the following configs: ✔️ legacy-recommended, ✅ recommended, 📦 recommended-publishable.
The rule checks that, if present, the packageManager property is a validated according 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
Example of incorrect code for this rule:
{ "packageManager": "pnpm@>=10"}Examples of correct code for this rule:
{ "packageManager": "pnpm@10.3.0"}{ "packageManager": "pnpm@10.3.0+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa"}