v2.2.0
What's New
Knip integration — unused code detection
codestyle check now runs knip as a 4th parallel tool alongside TypeScript, oxlint, and oxfmt. Knip detects:
- Unused files — source files not reachable from any entry point
- Unused exports — exported functions, types, and constants nobody imports
- Unused dependencies — packages in
package.jsonthat are never used - Unlisted dependencies — imports referencing packages not in
package.json
Configuration
Knip auto-detects your framework from package.json (Next.js, Vitest, Prisma, etc.). For fine-tuning, add a knip.json at your project root:
```json
{
"$schema": "https://unpkg.com/knip@6/schema.json",
"ignoreDependencies": ["@jterrazz/codestyle", "@jterrazz/test", "@jterrazz/typescript"],
"ignoreBinaries": ["oxlint", "oxfmt"]
}
```
Notes
- Knip runs only in `check` mode (not `fix`) since its auto-fix removes exports and files
- No configuration required for most projects — knip's 100+ plugins handle framework detection
- Runs in parallel with other tools, so no impact on CI time