# Quickstart: Add Knip Unused Code Detection **Date**: 2026-03-05 ## What This Feature Does Adds Knip to the project to detect unused files, exports, dependencies, devDependencies, and types across the pnpm workspace. Enforces it as part of the `pnpm check` quality gate (which runs on every commit via Lefthook). ## Files Changed | File | Change | |------|--------| | `package.json` | Add `knip` devDependency; add `knip` script; update `check` script | | `knip.json` (new) | Workspace-aware Knip configuration | ## How to Use ```bash # Run unused-code check standalone pnpm knip # Run full quality gate (now includes Knip) pnpm check ``` ## Verification 1. `pnpm check` passes on the current codebase (no false positives). 2. Add an unused export to any file → `pnpm knip` reports it → `pnpm check` fails.