Why this matters
Root-only lockfiles avoid divergent dependency graphs and flaky builds in workspaces.
Permit exactly one lockfile at the monorepo root (pnpm-lock.yaml, yarn.lock, or package-lock.json). Forbid lockfiles inside workspace packages. Validate against PR changes and existing tree.
Root-only lockfiles avoid divergent dependency graphs and flaky builds in workspaces.
Side-by-side examples engineers can pattern-match during review.
{
"changedFiles": [
"packages/web/yarn.lock",
"packages/api/package-lock.json"
]
}{
"changedFiles": [
"pnpm-lock.yaml",
"packages/web/src/App.tsx"
]
}packages/app/yarn.lockpnpm-lock.yamlFrom the same buckets as this rule.