Skip to content

packageManagerValidity

Enforces that the packageManager property 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.

{
"packageManager": "pnpm"
}
{
"packageManager": "pip@1.2.3"
}
{
"packageManager": "pnpm@latest"
}

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.

Made with ❤️‍🔥 around the world by the Flint team and contributors.