Severity levels
| Level | Behavior |
|---|---|
error | Report and fail CI (non-zero exit code) |
warn | Report but exit 0 |
off | Don’t detect or report |
error when not configured.
Configuration
Available rule names
| Rule | Description |
|---|---|
unused-files | Files not reachable from any entry point |
unused-exports | Exported symbols never imported |
unused-types | Type aliases and interfaces never referenced |
unused-dependencies | Packages in dependencies never used |
unused-dev-dependencies | Packages in devDependencies never used |
unused-enum-members | Enum values never referenced |
unused-class-members | Class members never referenced |
unresolved-imports | Imports that can’t be resolved |
unlisted-dependencies | Imported packages not in package.json |
duplicate-exports | Same symbol exported from multiple files |
circular-dependencies | Modules that import each other directly or transitively |
Incremental adoption strategy
Incremental adoption strategy
Adopting fallow in an existing codebase works best as a gradual process:
- Start permissive. Set all rules to
warnso you see issues without blocking CI. - Fix high-confidence rules first. Promote
unresolved-importsandunlisted-dependenciestoerror. These are almost never false positives. - Tackle unused files. Promote
unused-filestoerror. Unreachable files are safe to remove. - Address unused exports. This is usually the largest category. Promote to
erroronce the count is manageable. - Enable remaining rules. Promote
unused-types,unused-enum-members, andunused-class-membersas you clean up each category.
Use
--fail-on-issues in CI to temporarily treat all warnings as errors without changing the config file. This is useful for pre-merge gates on critical branches.Exit codes
| Code | Meaning |
|---|---|
0 | No error-severity issues |
1 | Error-severity issues found |
2 | Fatal error (invalid config, parse failure) |
See also
Configuration
Full config file reference with all available fields.
CI Integration
Set up fallow in GitHub Actions, GitLab CI, and more.