Repository navigation
Description
Summary
prettier/prettier is the repo's only formatting gate, and eslint.config.js:56 scopes its block to files: ['**/*.{js,jsx,ts,tsx}']. Markdown is therefore outside every gate: pnpm lint ignores it, there is no format or format:check script in package.json, and .github/workflows/ci.yml runs neither. .prettierrc still applies to .md whenever anything runs prettier over it, so main's Markdown has drifted from it and the backlog lands in whichever PR next touches a doc.
Measured on #467, a nine-file rename: 52 of its 118 changed lines are prettier reformatting Markdown the rename never touched — 44 in docs/testing.md (table re-alignment, *em* → _em_, one inserted blank line), 8 in AGENTS.md. The rename itself is about 15 lines. That noise is paid again on every docs PR, and it hides the real change from a reviewer reading the diff.
Approach
- Decide the rule first: either bring
.mdunder the gate, or take it out of prettier's scope. Half-covered is what produces the drift. - To gate it, add a
format:checkscript (prettier --check .) and aformatscript beside it, then add the check to thegatejob in.github/workflows/ci.yml. Do not wideneslint.config.js:56— eslint has no Markdown parser configured, and.claude/**is already in itsignoresat line 41. - ⚠ The lean gate
.claude/skills/pr-prep/check.shis under.claude/, a Protected Path an unattended run cannot write. Either leave the lean gate alone and gate only in CI, or hand that one edit to an attended run. - A first
prettier --writeover the existing Markdown is one large formatting-only commit. Keep it as its own commit so latergit blameon a doc line stays readable. - Check
.prettierignore(currently onlysrc/types/payload/) for docs that must not be reformatted.src/mocks/regions.ts's 27// prettier-ignorelines are the known precedent for format runs doing damage (docs/rules/code-comments.md).
Acceptance criteria
pnpm lintor a newformat:checkscript fails on a Markdown file that does not match.prettierrc, and that check runs in CI on a pull request.- Every tracked
.mdfile in the repo passes it onmain. - A PR that edits one line of a doc shows one changed line.
Verification checklist
-
npx prettier --check .passes from a cleanmaincheckout after the sweep. - Introduce an unformatted Markdown table in a scratch commit and confirm the gate goes red.
- Confirm the gate's check name is one the
mainruleset requires, or say in the PR that the ruleset edit is an attended browser step (docs/testing.md§ the required-checks table).
Notes
Found while reviewing #467. Not a defect in that PR — it only exposed the drift.
🤖 Written by the sydevs autonomous loop — see what this is
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Hold Until
Projects
- StatusShow more project fieldsAwaiting
Activity