[GH-ISSUE #7] Configure knip for dead code and unused dependency detection #1

Closed
opened 2026-10-15 18:19:46 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @morluto on GitHub (Jul 12, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/7

Motivation

As the project grows, it becomes harder to identify unused code, exports, and dependencies. Adding knip provides automated detection of dead code and unused dependencies, helping maintain a clean and minimal codebase.

Proposed Changes

  1. Add knip as a dev dependency
  2. Create knip.json or knip.config.ts configuration with appropriate entry points:
    • src/main.ts (MCP adapter)
    • src/cli.ts (CLI adapter)
    • scripts/rea.mjs (entry point)
  3. Add a lint:dead script in package.json
  4. Integrate into CI pipeline as a separate check

Acceptance Criteria

  • Running knip identifies unused files, exports, and dependencies
  • CI workflow includes a dead code check
  • Current codebase passes knip checks (clean baseline)
  • Future PRs are blocked if they introduce dead code
Originally created by @morluto on GitHub (Jul 12, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/7 ## Motivation As the project grows, it becomes harder to identify unused code, exports, and dependencies. Adding `knip` provides automated detection of dead code and unused dependencies, helping maintain a clean and minimal codebase. ## Proposed Changes 1. Add `knip` as a dev dependency 2. Create `knip.json` or `knip.config.ts` configuration with appropriate entry points: - `src/main.ts` (MCP adapter) - `src/cli.ts` (CLI adapter) - `scripts/rea.mjs` (entry point) 3. Add a `lint:dead` script in package.json 4. Integrate into CI pipeline as a separate check ## Acceptance Criteria - [ ] Running `knip` identifies unused files, exports, and dependencies - [ ] CI workflow includes a dead code check - [ ] Current codebase passes knip checks (clean baseline) - [ ] Future PRs are blocked if they introduce dead code
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1
No description provided.