@zuke/knip
`@zuke/knip` — a typed `KnipTasks` wrapper for the [Knip](https://knip.dev)
@zuke/knip on JSR ↗ 3 symbols
Symbols
class KnipRunSettings extends ToolSettings Settings for a knip run.
| Member | Signature | Doc |
|---|---|---|
production | production(): this | Restrict analysis to production code paths (--production). |
strict | strict(): this | Treat the production set strictly (--strict). |
fix | fix(): this | Auto-remove unused exports/dependencies where possible (--fix). |
cache | cache(): this | Enable the analysis cache (--cache). |
noExitCode | noExitCode(): this | Always exit 0, even when issues are found (--no-exit-code). |
config | config(path: PathLike): this | Use an explicit config file (--config). |
workspace | workspace(name: string): this | Restrict to a single workspace (--workspace). |
reporter | reporter(name: string): this | Choose the reporter, e.g. json or compact (--reporter). |
include | include(...types: string[]): this | Limit to specific issue types, e.g. files, dependencies (--include). |
const KnipTasks: KnipTasksApi Typed task functions for the knip CLI.
interface KnipTasksApi The shape of KnipTasks.
| Member | Signature | Doc |
|---|---|---|
run | run(configure?: Configure<KnipRunSettings>): Promise<CommandOutput> | Find unused files, dependencies, and exports: knip. |