formatting-enforcement
Installation
SKILL.md
Formatting Enforcement — Existing Project Retrofit
Existing projects typically have two problems this skill fixes:
- Silent-green lint CI — the workflow runs formatters in fix mode (
pint,biome --write,prettier --write), which always exit 0, so unformatted code merges forever and drift accumulates. Reformatting it later collides with open PRs. - Conflicting formatters — Prettier (with organize-imports/tailwind plugins) and Biome disagree on CSS quote style, import ordering, and JSON key sorting, so a pipeline that runs both can never satisfy a gate that checks both.
Procedure
Phase 0 — Measure the drift (check-only commands)
# PHP: Pint dry-run — exits 1 when files need reformatting
composer test:lint # pint --parallel --test
# Frontend: check-only, no writes
npm run format:check # prettier --check resources/ (if prettier is kept)
npm run lint:check # biome ci . (if biome is kept)