fallow migrate
Move to fallow and keep the settings you already have. Fallow migrate converts your existing knip, jscpd, or stylelint configuration to the fallow config format.
Keep the settings you already made in knip, jscpd, or stylelint when you move to fallow. fallow migrate reads your current config, converts it to the fallow format, and writes a new config file.
If more than one source config exists in your project, fallow merges them into a single config.
fallow migrate
Options
| Flag | Description |
|---|---|
--toml | Write fallow.toml. You cannot use it with --jsonc |
--jsonc | Write .fallowrc.jsonc instead of .fallowrc.json. The content is the same JSONC (with // comments) in both files. With the .jsonc extension, editors detect JSON-with-comments highlighting, and linters that flag comments in .json stay silent |
--dry-run | Show the generated config, and write nothing |
--from <PATH> | Path to the config file to migrate |
Without --jsonc or --toml, fallow uses the extension of the source file. A knip.jsonc migration writes .fallowrc.jsonc, and a knip.json migration writes .fallowrc.json. The fallow config parser accepts comments in both extensions.
What it detects
Fallow detects these sources automatically:
knip.json,knip.jsonc,.knip.json,.knip.jsonc,knip.ts,knip.config.tsknipfield inpackage.json.jscpd.jsonjscpdfield inpackage.json.stylelintrc,.stylelintrc.json,.stylelintrc.jsonc,stylelint.config.js,stylelint.config.cjs,stylelint.config.mjsstylelintfield inpackage.json
For stylelint, fallow maps the selector complexity rules (for example max-nesting-depth and selector-max-id) to the css-selector-complexity rule and turns on CSS analysis in audit. Formatting, ordering, naming, syntax, and vendor prefix rules stay in stylelint. Fallow shows a warning for each of these rules that your config turns on.
Fallow detects TypeScript config files (knip.ts, knip.config.ts), but it cannot parse them. Convert the file to knip.json first, then run migrate again.
Examples
# Detect config files and migrate
fallow migrate
# Preview without writing
fallow migrate --dry-runFallow shows a warning for each config field that it cannot migrate automatically.