fallow migrate

Migrate your existing knip, jscpd, or stylelint configuration to fallow. The migrate command reads your current config, translates it to fallow's 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

FlagDescription
--tomlOutput as fallow.toml (mutually exclusive with --jsonc)
--jsoncWrite to .fallowrc.jsonc instead of .fallowrc.json. The generated content is the same JSONC (with // comments) either way; the .jsonc extension lets editors auto-detect JSON-with-comments syntax highlighting and silences linters that flag comments in .json
--dry-runPreview the generated config without writing
--from <PATH>Path to the config file to migrate

Without --jsonc or --toml, fallow auto-mirrors the source extension: a knip.jsonc migration writes .fallowrc.jsonc, a knip.json migration writes .fallowrc.json. The fallow config parser accepts comments in both extensions.

What it detects

Fallow auto-detects:

  • knip.json, knip.jsonc, .knip.json, .knip.jsonc, knip.ts, knip.config.ts
  • knip field in package.json

TypeScript config files (knip.ts, knip.config.ts) are detected but cannot be parsed. Convert to knip.json first, then re-run migrate.

  • .jscpd.json
  • jscpd field in package.json

Examples

# Detect config files and migrate
fallow migrate

# Preview without writing
fallow migrate --dry-run

Warnings are shown for any config fields that can't be migrated automatically.

See also