Fallow: Static and Runtime Code Intelligence for JavaScript Projects
Run npx fallow, then npx fallow init, and address high‑severity dead code before committing.
Execute npx fallow, review the dead‑code report, and delete the unused files.
Summary
Fallow is a static + runtime code intelligence CLI that identifies dead code, duplication, and health metrics for TypeScript and JavaScript projects. It flags unused files, exports, dependencies, circular imports, and provides duplication thresholds (<5%, 5–15%, >15%) with type‑1/2 clone detection. Health analysis measures cyclomatic, cognitive, and CRAP scores, and the tool can auto‑remove dead exports and unused dependencies via a dry‑run. CSS/SCSS support treats classes as exported symbols and resolves @use/@forward chains. No initial config is required; npx fallow init creates a .fallow/config.json, and CI integration is available via npx fallow audit with --fail‑on‑issues. The result is a health badge grading the entire project and a clear path to clean code.
Key changes
- Dead‑code analysis that flags unused files, exports, dependencies, and circular imports
- Duplication analysis with thresholds (<5%, 5–15%, >15%) and type‑1/2 clone detection
- Health analysis measuring cyclomatic, cognitive, and CRAP scores
- Auto‑removal of dead exports and unused dependencies via dry‑run
- CSS/SCSS support treating classes as exported symbols and resolving @use/@forward chains
- No initial config required; npx fallow init creates a .fallow/config.json
- CI integration via npx fallow audit with --fail‑on‑issues
- Provides a health badge grading the entire project