CI keeps failing on formatting
Developers are not running Prettier locally, the editor extension is not installed, or format-on-save is off. Every PR now fails the format check before anyone reads it.
Format on save and pre-commit, uniformly
Running Prettier?
Prettier is almost silent until the day a CI check reformats a file nobody touched, two developers see different output for the same code, or a format-on-save loop fights a lint rule. We settle the config, align the editors, and keep the diff clean the next time someone opens a pull request.
What it is
Prettier is an opinionated code formatter, originally written by James Long and first released in 2017. It parses source files into an AST and re-prints them in a canonical style, which removes almost every formatting argument from code review. The project currently supports JavaScript, TypeScript, JSX, CSS, SCSS, Less, HTML, Vue, Angular, GraphQL, Markdown, MDX, YAML and JSON out of the box.
Plugins extend it to Astro, Svelte, Tailwind class sorting, SQL, PHP, Ruby and more. Prettier 3 introduced a stricter trailing comma default, moved to pure ESM, and renamed several options, which caused real upgrade churn across projects. It is almost always paired with ESLint through eslint-config-prettier or a lint-staged pre-commit hook.
The honest version
No technology is all upside. This is where Prettier earns its place and where it tends to cause trouble.
Sound familiar?
The Prettier problems that bring people to us, and what you have once each one is fixed.
Developers are not running Prettier locally, the editor extension is not installed, or format-on-save is off. Every PR now fails the format check before anyone reads it.
Format on save and pre-commit, uniformly
Prettier is installed globally on one machine and from devDependencies on another, or a pnpm workspace has resolved different versions for sibling packages.
One pinned version across the repo
lint-staged is running Prettier on files it should not, a plugin is missing on one machine, or husky itself is not installed after a fresh clone.
Hook reliable on every machine
Rules that overlap between the two are both active, so eslint --fix and prettier --write keep undoing each other's work on save.
Responsibilities split cleanly
Astro, Svelte or a custom extension is not being matched, usually because the matching plugin was never installed or the overrides block in config is wrong.
Plugin wired up, files formatting
A first-time format pass rewrote the whole repository in a single commit, and now every line in git blame points at that commit instead of the author who actually wrote it.
Blame fixed with .git-blame-ignore-revs
A mixed team with no shared .gitattributes or Prettier endOfLine setting is producing CRLF and LF in the same files, which shows up as full-file diffs.
Line endings consistent, diffs quiet
Both the ESLint and Prettier VS Code extensions claim to be the default formatter, so the saved result depends on which one wins the race.
One editor formatter, deterministic output
What we do
Call us for one failing hook, or let us set formatting up across the repo properly.
How it works
Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.
We fix the cause, not the symptom. If something is down, getting it back up comes first.
Backups, monitoring, updates and access, so the same problem can't quietly come back.
You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.
Often found together
We work on the whole stack, so the problem can be wherever it actually is.
The accepted answer is to let Prettier own formatting and ESLint own code quality. We install eslint-config-prettier to disable the ESLint rules that overlap with Prettier, decide whether lint and format run as one command or two, and confirm the editor and CI agree on the result.
Yes. We run the full format as its own commit, record its SHA in a .git-blame-ignore-revs file at the repo root, and configure both your editor and the GitHub blame view to skip it. After that, blame still points at the person who originally wrote each line.
Almost always a version mismatch. One machine is running Prettier 2.x and the other is on 3.x, or a plugin like prettier-plugin-tailwindcss is installed in different versions. Pinning Prettier in devDependencies and committing the lockfile stops it immediately.
Usually yes, but not in a hurry. The trailing comma default and option renames mean your first run produces a sweeping diff. We script the migration, apply it as a single commit, and update plugins and editor settings in the same change so it is a one-off rather than a drawn-out transition.
The common pattern is husky plus lint-staged, with Prettier running against only the staged files. We wire the hook up, document how to install husky after a clone, and make sure CI runs the same check so nothing slips in through a bypassed hook.
A written estimate is free. Drop us the current .prettierrc and a sample of the trouble, and we come back with pricing before anything is committed.
Free estimate
Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.
Your message is with a real person, and we'll get back to you soon.
Rather talk now? Call us: