Migrating from jscpd
Move from jscpd to fallow to get duplication detection and unused code, complexity, circular dependency, and architecture boundary checks from one tool.
Replace jscpd with fallow when you want duplication detection as part of a larger codebase audit. The same binary also finds unused code, complex functions, circular dependencies, and architecture boundary violations.
Migration workflow
Preview the migration
Run
fallow migrate --dry-runto see the generated config. The command writes no files.fallow migrate --dry-runfallow looks for
.jscpd.jsonand thejscpdfield inpackage.json.Generate the config
When the preview looks correct, run the migration:
fallow migrate # Write .fallowrc.json fallow migrate --toml # Or output as fallow.tomlReview the config
Open the generated config. Check the translated thresholds, token counts, and ignore patterns.
Run fallow dupes
Run your first duplication analysis:
fallow dupes
What gets migrated
| jscpd | Fallow |
|---|---|
threshold | duplicates.threshold |
minTokens | duplicates.minTokens |
minLines | duplicates.minLines |
mode | duplicates.mode (fallow warns that weak can differ) |
skipLocal | duplicates.skipLocal |
ignore | duplicates.ignore |
format | -- (fallow auto-detects languages) |
Comparison
| Fallow | jscpd | |
|---|---|---|
| Raw duplication speed | Part of the broader audit flow | jscpd v5 is faster on the current README benchmark fixtures |
| Detection modes | 4 (strict, mild, weak, semantic) | 3 (strict, mild, weak) |
| Algorithm | Suffix array with LCP | Rabin-Karp rolling hash |
| Unused code + circular deps | Built-in (fallow dead-code) | Unused code with --dead-code (v5.3+), no circular dependencies |
| Complexity + maintainability | Built-in (fallow health) | --complexity and --health (v5.3+) |
| Clone families | Yes, with refactoring suggestions | No |
| Cross-language | TS to JS type stripping | --cross-formats groups (for example JS and TS) |
| Baseline tracking | Yes | Yes (--baseline, v5.1+) |
| Runtime dependency | Native binary | Native binary in v5 |
Detection mode mapping
jscpd v5 has strict, mild, and weak modes. For exact token matching, the closest fallow mode is strict.
Fallow uses mild mode by default. This mode normalizes syntax variations, so it can report more clones than jscpd did. To get results closer to jscpd, use strict mode:
fallow dupes --mode strict
To also match clones with renamed variables, use semantic mode:
fallow dupes --mode semantic
One tool for the full picture
One binary replaces separate jscpd, knip, and madge runs:
fallow dead-code # Unused code + circular deps + boundaries
fallow dupes # Code duplication (replaces jscpd)
fallow health # Complexity hotspots + maintainability scores
fallow # All of the above in one pass