Appearance
Fallow how-to
Fallow is a static module-graph analyzer. It finds unused files/exports, duplication, and architecture hotspots. Complementary to ESLint and tsc.
Official docs: docs.fallow.tools
Install
bash
pnpm add -D fallow
pnpm run fallow:type-aware-status # optional companion check| Item | Path |
|---|---|
| Config | .fallowrc.json |
| Cache | .fallow/ (gitignored) |
| Audit baselines | e.g. config/fallow/*-baseline.json |
Commands
bash
pnpm run fallow:check
pnpm run fallow:audit
pnpm run fallow:health
pnpm run fallow
pnpm exec fallow dead-code --type-aware --symbol-impact path/to/file.ts:exportNameImplementation examples
Config shape
json
{
"ignorePatterns": ["**/*.gen.ts", "studio/**"],
"typeAware": {
"enabled": true,
"projects": ["tsconfig.json"],
"require": "best-effort"
},
"audit": {
"gate": "new-only",
"healthBaseline": "config/fallow/health-baseline.json"
}
}Catch a dead export
ts
// no longer imported
export function oldHelper() {
return 1;
}bash
pnpm run fallow:check
# delete the export or restore a real importPR / agent gate
bash
pnpm run fallow:audit # new dead code vs merge-baseIgnore docs-only deps
List packages used only by VitePress (e.g. mermaid) under ignoreDependencies.
Privacy
Analysis is local. Telemetry off by default.