Skip to content

v2.2.0

Choose a tag to compare

@jterrazz jterrazz released this 01 Apr 13:09
· 18 commits to main since this release
8a6567a

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.json that 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