Migrating from jscpd
Move from jscpd to fallow: one command converts your jscpd config to fallow duplication settings. Learn what gets migrated and how detection modes map.
The fallow migrate command translates your jscpd configuration to the duplicates section of a fallow config. This page shows the steps, the field mapping, and the detection mode mapping.
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) |
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 a migrated project can show clones that strict mode does not report. To report only exact token matches, use strict mode:
fallow dupes --mode strict
To also match clones with renamed variables, use semantic mode:
fallow dupes --mode semantic
Other analyses
The same binary runs the other fallow analyses:
fallow dead-code # Unused code + circular deps + boundaries
fallow dupes # Code duplication
fallow health # Complexity hotspots + maintainability scores
fallow # All of the above in one pass