pruneguard includes built-in config converters for knip and dependency-cruiser.
Both produce a pruneguard.json with migration notes so you can switch tools
without starting from scratch.
pruneguard migrate knip [file]Config discovery:
- Uses the explicit
fileargument if provided - Otherwise looks for
knip.json - Otherwise looks for
package.json#knip
Mapping:
| knip | pruneguard |
|---|---|
entry |
entrypoints.include |
project |
ignorePatterns (inverted) |
workspaces |
workspaces.roots |
ignore |
ignorePatterns |
ignoreDependencies |
analysis.ignoreDependencies |
Known limitations are emitted as warnings in the migration output.
import { migrateKnip } from "pruneguard";
const result = await migrateKnip({ file: "knip.json" });
console.log(JSON.stringify(result.config, null, 2));
for (const w of result.warnings) {
console.warn(`warning: ${w}`);
}pruneguard migrate depcruise [file]Config discovery:
- Uses the explicit
fileargument if provided - Otherwise searches common
.dependency-cruiser.*filenames - Supports
--nodefor evaluating dynamic config files (JS/TS configs)
Mapping:
| dependency-cruiser | pruneguard |
|---|---|
forbidden |
rules.forbidden |
required |
rules.required |
options.tsConfig |
resolver.tsconfig |
options.exclude |
ignorePatterns |
Known limitations are emitted as warnings in the migration output.
import { migrateDepcruise } from "pruneguard";
const result = await migrateDepcruise({ node: true });
console.log(JSON.stringify(result.config, null, 2));
for (const w of result.warnings) {
console.warn(`warning: ${w}`);
}- Run the migration command to generate
pruneguard.json. - Review the generated config and any warnings.
- Run
pruneguard scanto see the initial findings. - Adjust severity levels and ignore patterns as needed.
- Save a baseline:
pruneguard --no-cache --no-baseline --format json scan > baseline.json - Commit
pruneguard.jsonandbaseline.json. - Remove the old tool's config file when ready.