Skip to content
Fallow home
All docs pages

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

FlagDescription
--tomlWrite fallow.toml. You cannot use it with --jsonc
--jsoncWrite .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-runShow 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.ts
  • knip field in package.json
  • .jscpd.json
  • jscpd field in package.json
  • .stylelintrc, .stylelintrc.json, .stylelintrc.jsonc, stylelint.config.js, stylelint.config.cjs, stylelint.config.mjs
  • stylelint field in package.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-run

Fallow shows a warning for each config field that it cannot migrate automatically.

See also