Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

From pint.json

How pun migrate translates pint.json keys and rules.

Pun reads pun.toml, not pint.json. pun migrate --from pint translates the settings:

pint.json pun.toml
"preset": "laravel" [format] preset = "laravel"
"preset": "per" preset = "empty" and the preset’s rules in [format.rules]
"preset": "symfony" Not supported. pun migrate stops with an error
"rules" that differ from the preset [format.rules], with Pun IDs and option names
Risky and code-deleting rules [lint.rules] at "error"
"in" [files] paths
"exclude" [files] exclude, which every command applies
"notName", "notPath" [format] not-name, not-path, which only format applies
"extend" Resolved as Pint resolves it
"Pun/prefer_fake_helper": true [lint.rules] "laravel/prefer-fake-helper" = "error"

Two Pint behaviours differ after migration:

  • A plain folder name in exclude, such as tmp, matches at any depth only for format. Lint and analyse skip only tmp at the project root. Write **/tmp to skip it everywhere. See exclusions.
  • Lint rules that came from Pint, such as imports/no-unused, still check files that notName and notPath skip.

pun migrate reads a .php-cs-fixer.php through PHP-CS-Fixer with system PHP. If you select both configs, pint.json wins.

Migration reports the rules it skips. The Pint rule mapping lists every rule, its options, and what is unsupported. To apply the format and lint rules of a migrated config, run pun check --fix. The migration guide covers the rest of the switch.

Last updated on

Was this page helpful?