Skip to content

chore(knip): ignore intentional root devDependencies#4

Merged
RedStar071 merged 1 commit into
mainfrom
fix/knip-ignore-unused-devdeps
Jul 7, 2026
Merged

chore(knip): ignore intentional root devDependencies#4
RedStar071 merged 1 commit into
mainfrom
fix/knip-ignore-unused-devdeps

Conversation

@blacksmith-sh

@blacksmith-sh blacksmith-sh Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Context

The 🧹 Unused code check CI job (pnpm exec knip) is failing on main. Knip reports four root devDependencies as unused:

Unused devDependencies (4)
@favware/npm-deprecate     package.json:28:6
@swc/core                  package.json:30:6
@types/ws                  package.json:32:6
cz-conventional-changelog  package.json:34:6

This failure is pre-existing on main (it was surfaced on the merged docs PR #3, which only touched README.md), so every PR and push currently trips the knip job.

Why these are intentional, not dead weight

None of these are actually removable; knip just can't see how they're used statically:

  • @swc/core is an approved native build dependency in pnpm-workspace.yaml (allowBuilds), pulled in for the SWC-based tooling.
  • cz-conventional-changelog is wired up through the commitizen config in package.json (config.commitizen.path).
  • @favware/npm-deprecate is a release/maintenance CLI.
  • @types/ws is part of the standard ecosystem type set.

The sister repo wolfstar-project/stars-components (which this monorepo is modeled after) already ignores this exact same set in its knip.json. This change mirrors that convention rather than deleting dependencies.

Change

Add the four dependencies to ignoreDependencies on the root workspace in knip.json:

".": {
  "project": ["*.ts"],
  "ignoreDependencies": [
    "@favware/npm-deprecate",
    "@swc/core",
    "@types/ws",
    "cz-conventional-changelog"
  ]
}

Verification

  • pnpm exec knip now exits 0.
  • pnpm exec oxfmt --check knip.json passes.
  • pnpm exec changeset status --since=origin/main passes (root-only change, no package bump needed, so no changeset).

View with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is enabled.

Confidence Score: 5/5

This looks safe to merge.

No blocking issues were found in the changed code. The ignore list is scoped to the root workspace, and package workspace checks remain configured separately.

No files need attention.

T-Rex T-Rex Logs

What T-Rex did

  • Recorded the before-state on the base checkout, noting the full pnpm exec knip output and exit code 1.
  • Recorded the after-state on the head checkout, noting the full pnpm exec knip output and exit code 1.
  • Validated that the head oxfmt check completed successfully.
  • Validated that the head changeset status check completed successfully.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "chore(knip): ignore intentional root dev..." | Re-trigger Greptile

@blacksmith-sh
blacksmith-sh Bot requested a review from RedStar071 as a code owner July 5, 2026 10:33
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

✅ All tests passed.

@RedStar071
RedStar071 merged commit d8a845b into main Jul 7, 2026
16 checks passed
@RedStar071
RedStar071 deleted the fix/knip-ignore-unused-devdeps branch July 7, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant