SKY-Q411 · Quality, structure and performance
Unused pnpm catalog entry
A pnpm-workspace.yaml catalog entry is not referenced by any package.json in the workspace. Neither the default catalog nor a named catalog is used through the catalog protocol for that package.
- Languages
- pnpm-workspace.yaml, package.json
- Turned on by
skylos . --quality- Quality gate
- counted toward the gate limits (full and diff scans). Reported as quality; counts toward max_quality.
- Finding type
- review
Why it matters
Stale catalog entries look like supported versions that nobody installs. They mislead upgrades and reviews and keep pinning a package the workspace no longer uses.
What Skylos flags
packages: - "."catalog: lodash: ^4.17.21 left-pad: ^1.3.0{"name":"shop","private":true,"dependencies":{"lodash":"catalog:"}}import _ from "lodash";console.log(_);What Skylos leaves alone
packages: - "."catalog: lodash: ^4.17.21Why Skylos leaves it alone
Every catalog entry is referenced with the catalog protocol by a workspace package.
How Skylos decides
- Reads catalog and catalogs from each pnpm-workspace.yaml as data, with YAML 1.2 scalars, and never runs pnpm or a pnpmfile hook.
- Collects catalog references from every package.json under the workspace root (dependency maps, resolutions, overrides, pnpm.overrides and catalog references in scripts) plus the workspace file's own overrides. Folders the dependency scan skips are still searched.
- Reports LOW at the entry line only when that inventory is complete. An unreadable manifest, a pnpmfile hook, a competing bun or Yarn catalog source, or an unparsed reference holds back every unused-entry claim and is recorded in analysis_summary.npm_dependency_analysis.catalog_analysis.
How to fix it
Remove the unused entry, or reference it from the workspace package that needs it.
packages: - "."catalog: lodash: ^4.17.21Removed: left-pad: ^1.3.0When it can be wrong
- A catalog entry kept for an upcoming package or a published template is reported until a package.json references it.
- Tools that rewrite manifests outside pnpm hooks are not modelled.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
Set
[tool.skylos] ignore = ["SKY-Q411"]to disable this rule project-wide.