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 pintThis 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 diffBoth 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 justpun format, to get everything your Pint config did. - The Pint mapping shows where each Pint rule went.
--ansiand--no-ansiare--color=alwaysand--color=never.--bail,--cache-fileand thetxtandxmlformats 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.