Migration workflow
Preview the migration
Run Fallow searches for
fallow migrate --dry-run to see the generated config without writing anything:.jscpd.json and the jscpd field in package.json.Review the config
Open the generated config and verify the translated thresholds, token counts, and ignore patterns.
What gets migrated
| jscpd | fallow |
|---|---|
threshold | duplicates.threshold |
minTokens | duplicates.minTokens |
minLines | duplicates.minLines |
ignore | ignorePatterns |
format | — (fallow auto-detects languages) |
Comparison
| fallow | jscpd | |
|---|---|---|
| Speed (real-world) | 20—33x faster | Baseline |
| Detection modes | 4 (strict, mild, weak, semantic) | 1 (token-based) |
| Algorithm | Suffix array with LCP | Rabin-Karp rolling hash |
| Dead code integration | Built-in (fallow check) | Not included |
| Clone families | Yes, with refactoring suggestions | No |
| Cross-language | TS to JS type stripping | Format-based |
| Baseline tracking | Yes | No |
| Runtime dependency | None | Node.js |
Detection mode mapping
jscpd uses a single token-based detection mode. The closest fallow equivalent ismild (the default), which normalizes syntax variations.
For stricter matching (like jscpd), use strict mode:
Replace two tools with one
Fallow includes both dead code analysis and duplication detection, so you can replace both jscpd and knip with a single tool.
See also
Duplication analysis
Deep dive into fallow’s duplication detection engine.
fallow dupes
Full CLI reference for the dupes command.