Knip v6 Lands oxc Parser for 2-4x Performance Gains Across the Board

Knip v6 Lands oxc Parser for 2-4x Performance Gains Across the Board

lschvn

The team behind Knip, the widely-used open-source tool for finding unused files, dependencies, and exports in JavaScript and TypeScript projects, has shipped version 6 — and the headline number is hard to ignore: 2 to 4 times faster across the board.

The key change is a complete swap of the TypeScript backend for oxc-parser, the Rust-based parser from the Oxc Project. Author Lars Kappert calls it the natural next step after years of incremental tuning.

Why the TypeScript backend hit a wall

Knip has always parsed each file only once, but the old TypeScript-based engine carried the overhead of wiring up an entire program and typechecker along with it. That setup was designed for IDEs and language servers — keeping symbols connected across a project — which is considerably more than what a single-pass static analyzer needs.

"The TypeScript backend made the setup as a whole harder and slower than it needed to be, especially to keep large monorepos in check," Kappert wrote in the v6 announcement.

The TypeScript team is also in the process of rewriting the compiler in Go for v7 (a project Microsoft previewed in March 2026). That rewrite would have eventually broken the LanguageService-based APIs that Knip's more niche features — like classMembers tracking — relied on. The move to oxc was as much about future-proofing as performance.

The numbers

The Knip team benchmarked v5.88.0 against v6.0.0 on real-world projects:

Projectv5.88.0v6.0.0Speedup
Astro4.0s2.0s2.0x
TanStack Query3.8s1.7s2.2x
Rolldown3.7s1.7s2.2x
Sentry11.0s4.0s2.8x
TypeScript (microsoft/TypeScript)3.7s0.9s4.1x

The Rust-based parser tears through the Microsoft TypeScript repo in under a second.

What else changed in v6

Beyond the core performance work, several plugins were updated to statically analyze configuration files directly rather than importing them — including ESLint (flat config), tsdown, and tsup. This removes the need to actually load transitive dependencies just to scan them, further improving speed and reducing memory pressure.

Support for TypeScript namespaces and modules improved too, via a new namespaceMembers issue type that was previously ignored in v5.

Breaking changes to be aware of

  • Node.js v20.19.0+ required — v18 support is dropped
  • classMembers issue type removed — no longer viable without TypeScript's JS-based LanguageService API
  • --include-libs and --isolate-workspaces flags removed — these are now the default (and only) behavior
  • --experimental-tags renamed to --tags
  • Reporter function signatures changed: issues.files is now consistent with other issue shapes
  • JSON reporter now consistently uses arrays for all issue types

Upgrade path

npm install -D knip@latest

If your project relies on the classMembers feature, open an issue on GitHub — Kappert has signaled openness to finding a solution, possibly a dedicated companion tool.

The full migration guide and documentation are on the Knip website.

Frequently Asked Questions

Related articles

More coverage with overlapping topics and tags.

Oxc Is Quietly Building the Fastest JavaScript Toolchain in Rust — And It's Almost Ready
javascript

Oxc Is Quietly Building the Fastest JavaScript Toolchain in Rust — And It's Almost Ready

While ESLint v10 was wrestling with legacy cleanup, the Oxc project shipped a linter 100x faster, a formatter 30x faster than Prettier, and a parser that leaves SWC in the dust. Here's what the JavaScript oxidation compiler actually is.
ESLint v10 Drops Legacy Config — And the JS Ecosystem Is Taking Notes
javascript

ESLint v10 Drops Legacy Config — And the JS Ecosystem Is Taking Notes

ESLint's biggest breaking-change release in years finalises flat config, removes eslintrc support entirely, and adds JSX reference tracking. But the bigger story might be what's nipping at its heels.
Pretext: The DOM-Free Text Measurement Library That AI Coding Agents Are Already Using
javascript

Pretext: The DOM-Free Text Measurement Library That AI Coding Agents Are Already Using

Cheng Lou just released Pretext, a pure JavaScript library that measures and lays out multiline text without touching the DOM. Here's why that matters for virtualization, layout control, and AI agents that write UI code.

Comments

Log in Log in to join the conversation.

No comments yet. Be the first to share your thoughts.