Skip to content

Replace ts-prune with knip for unused export detection#82

Merged
shinpr merged 3 commits intomainfrom
feat/replace-ts-prune-with-knip
Mar 19, 2026
Merged

Replace ts-prune with knip for unused export detection#82
shinpr merged 3 commits intomainfrom
feat/replace-ts-prune-with-knip

Conversation

@shinpr
Copy link
Owner

@shinpr shinpr commented Mar 19, 2026

Summary

  • Replace unmaintained ts-prune with knip for unused export detection
  • Remove custom wrapper script (scripts/check-unused-exports.cjs) — knip handles categorization, exit codes, and reporting natively
  • Consolidate check:unused and check:unused:all into a single check:unused script

Changes

File Change
package.json Replace ts-prune devDep with knip, update scripts
knip.json New config: project scope, test ignores, ignoreExportsUsedInFile
scripts/check-unused-exports.cjs Deleted (no longer needed)
pnpm-lock.yaml Auto-updated

Test plan

  • pnpm run check:unused runs knip --include exports and exits 0
  • pnpm run check:all passes all gates (lint, format, unused, deps, build, test)
  • All 440 tests pass

Closes #67

🤖 Generated with Claude Code

ts-prune is unmaintained. Replace it with knip, which natively supports
unused export detection with proper exit codes for CI gating.

- Add knip as devDependency, remove ts-prune
- Add knip.json with project config and ignoreExportsUsedInFile
- Consolidate check:unused and check:unused:all into single check:unused script
- Remove scripts/check-unused-exports.cjs wrapper (knip handles this natively)

Closes #67

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shinpr shinpr self-assigned this Mar 19, 2026
shinpr and others added 2 commits March 19, 2026 13:06
Replace .tsprunerc with knip.json in npm publish exclusions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ts-prune has been replaced with knip; this config is no longer used.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shinpr shinpr merged commit b8196fd into main Mar 19, 2026
1 check passed
@shinpr shinpr deleted the feat/replace-ts-prune-with-knip branch March 19, 2026 04:09
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.

Replace ts-prune with maintained alternative (e.g. knip)

1 participant