Skip to content

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
ItemPath
Config.fallowrc.json
Cache.fallow/ (gitignored)
Audit baselinese.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:exportName

Implementation 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 import

PR / agent gate

bash
pnpm run fallow:audit   # new dead code vs merge-base

Ignore docs-only deps

List packages used only by VitePress (e.g. mermaid) under ignoreDependencies.

Privacy

Analysis is local. Telemetry off by default.

Frontend Corner — agent ops, tooling, and decision records