Skip to main content
The rules system lets you control the severity of each issue type for incremental CI adoption.
Start with all rules as warn, then promote to error one type at a time as the codebase cleans up.

Severity levels

LevelBehavior
errorReport and fail CI (non-zero exit code)
warnReport but exit 0
offDon’t detect or report
All issue types default to error when not configured.

Configuration

{
  "rules": {
    "unused-files": "error",
    "unused-exports": "warn",
    "unused-types": "off",
    "unused-dependencies": "error",
    "unused-dev-dependencies": "warn",
    "unused-enum-members": "warn",
    "unused-class-members": "off",
    "unresolved-imports": "error",
    "unlisted-dependencies": "error",
    "duplicate-exports": "warn"
  }
}

Available rule names

RuleDescription
unused-filesFiles not reachable from any entry point
unused-exportsExported symbols never imported
unused-typesType aliases and interfaces never referenced
unused-dependenciesPackages in dependencies never used
unused-dev-dependenciesPackages in devDependencies never used
unused-enum-membersEnum values never referenced
unused-class-membersClass members never referenced
unresolved-importsImports that can’t be resolved
unlisted-dependenciesImported packages not in package.json
duplicate-exportsSame symbol exported from multiple files
circular-dependenciesModules that import each other directly or transitively
Adopting fallow in an existing codebase works best as a gradual process:
  1. Start permissive. Set all rules to warn so you see issues without blocking CI.
  2. Fix high-confidence rules first. Promote unresolved-imports and unlisted-dependencies to error. These are almost never false positives.
  3. Tackle unused files. Promote unused-files to error. Unreachable files are safe to remove.
  4. Address unused exports. This is usually the largest category. Promote to error once the count is manageable.
  5. Enable remaining rules. Promote unused-types, unused-enum-members, and unused-class-members as you clean up each category.
Use baselines to avoid blocking CI on pre-existing issues while enforcing rules on new code.
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.
fallow check --fail-on-issues

Exit codes

CodeMeaning
0No error-severity issues
1Error-severity issues found
2Fatal 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.