Skip to content

Related Tooling

This is an overview of related tooling for features Knip does not support.

Knip doesn’t look for unused variables within a file. The focus is on exported and imported values and types across files.

Use ESLint, Biome or oxlint to find unused variables within files.

Use remove-unused-vars to remove unused code within files, but in a more valiant way. Using input from any of the above linters, it actually removes a lot more unused code. This pairs great with Knip.

Knip does not yet support finding unused members of types, interfaces and objects. This includes returned objects from exported functions and objects passed as React component props.

Knip does support finding unused members of enums and classes, and exported values and types on imported namespaces.

Knip has no issues with circular dependencies, and does not report them. Tools that do support this include DPDM, Madge and skott.

The e18e.dev website and in particular the Cleanup section is a great resource when dealing with technical debt.

ISC License © 2024 Lars Kappert