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

Migrating from Pint

Move a project from Pint to Pun in three steps.

Start with a clean Git tree, and keep Pint around until you’ve compared the two.

Convert the config

pun migrate --from pint --dry-run   # see what it would write
pun migrate --from pint

This writes pun.toml. If a rule isn’t supported yet, Pun tells you and skips it.

Compare

vendor/bin/pint
pun check --fix
vendor/bin/pint --test
pun check
git diff

Both checks should pass and the diff should be empty. If not, look at what’s different before you switch. pun check may also find lint and analyse problems Pint never looked for. That’s expected.

Update scripts and CI

{
	"scripts": {
		"lint": "pun check --fix",
		"test:lint": "pun check"
	}
}

In CI, swap vendor/bin/pint --test for pun check. See CI.

Good to know

  • Pint’s risky fixers are lint rules in Pun. So use pun check --fix, not just pun format, to get everything your Pint config did.
  • The Pint mapping shows where each Pint rule went.
  • --ansi and --no-ansi are --color=always and --color=never. --bail, --cache-file and the txt and xml formats aren’t supported.

Done with Pint?

pun remove laravel/pint
rm pint.json

Changed your mind? Put your old scripts and CI back. Migration never deletes pint.json.

Last updated on

Was this page helpful?