Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fallow.tools/llms.txt

Use this file to discover all available pages before exploring further.

Production mode restricts analysis to code that ships to users, ignoring test and development files.
fallow dead-code --production
Or set it in your config:
// .fallowrc.json
{
  "production": true
}

What changes in production mode

BehaviorDefaultProduction
Test files (*.test.*, *.spec.*, __tests__/)IncludedExcluded
Story files (*.stories.*)IncludedExcluded
Mock files (__mocks__/)IncludedExcluded
Package.json scripts analyzedAllOnly start, build, serve, preview, prepare, prepublishOnly, postinstall, and pre/post lifecycle hooks for start, build, serve, install
Unused devDependenciesReportedSkipped
Type-only dependenciesNot flaggedFlagged (should be devDependencies)
$ fallow dead-code --production
 Unused exports (2)
  src/utils/format.ts
    :12 formatCurrency
    :28 formatPercentage
  Exported symbols with zero references https://docs.fallow.tools/explanations/dead-code#unused-exports

 Unused dependencies (1)
  moment
  Packages in dependencies never imported https://docs.fallow.tools/explanations/dead-code#unused-dependencies

 Type-only dependencies (1)
  zod  move to devDependencies (only imported via 'import type')
  Production dependencies only used as types https://docs.fallow.tools/explanations/dead-code#type-only-dependencies

 4 issues (19ms, production mode, 623/847 files)

Type-only dependency detection

In production mode, fallow detects dependencies that are only imported via import type:
import type { Config } from 'some-package';  // Type-only, erased at runtime
These packages belong in devDependencies since types are erased at runtime and don’t need to be installed in production.
In monorepos, production mode catches dependencies that should be devDependencies, keeping each package’s install footprint minimal.

See also

CI Integration

Use production mode in your CI pipeline for lean, fast checks.

Rules & Severity

Control which issue types are errors, warnings, or disabled.