prettier --check reports Markdown code style issues in CI
Prettier ran in check mode over your Markdown and found files that are not formatted to its rules. It lists each file under "Code style issues found" and exits non-zero without changing anything.
What this error means
A docs formatting step fails with "[warn] docs/guide.md" lines and "Code style issues found in N files. Run Prettier with --write to fix.".
Checking formatting...
[warn] docs/guide.md
[warn] README.md
[warn] Code style issues found in 2 files. Run Prettier with --write to fix.Common causes
Markdown was not formatted before commit
Files were edited without running prettier --write, so their formatting does not match Prettier rules.
Config or prose-wrap differs between local and CI
A different proseWrap setting or missing config makes CI reformat lines that looked fine locally.
How to fix it
Format and commit, then check in CI
- Run
prettier --writeover your docs locally. - Commit the reformatted files.
- Keep
prettier --checkin CI to gate future drift.
npx prettier --write "**/*.md"
git add -ACommit a config so prose formatting is deterministic
Set proseWrap explicitly so CI and local agree on how Markdown lines wrap.
{
"proseWrap": "preserve",
"printWidth": 100
}How to prevent it
- Run
prettier --writein a pre-commit hook for Markdown. - Commit a
.prettierrcwith an explicitproseWrapsetting. - Pin the Prettier version so formatting rules do not drift.