Markdown is never formatted: script/fmt covers only Go, and no prettier config exists #100
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the audit against the canonical
REPO_POLICIES.md, verified againstmainat61f42e6.The policy states:
> Use platform-standard formatters:
blackfor Python,prettierfor JS/CSS/Markdown/HTML,go fmtfor Go. Always use default configuration with two exceptions: four-space indents (except Go), andproseWrap: alwaysfor Markdown (hard-wrap at 80 columns).script/fmt:11runsgofmt -wover Go files andscript/fmt-check:11runsgofmt -l .— Go only. There is no.prettierrcor.prettierignorein the repo. The markdown demonstrably is not prettier output:README.mdprose is hard-wrapped at roughly 66-70 columns (e.g. lines 3-8) whereproseWrap: alwaysat prettier's defaultprintWidth: 80would reflow to ~78;TODO.mdmaxes at 72.Practical consequence: markdown formatting is currently whatever each author happened to do, and
make checkcannot catch drift. The repo also serves HTML templates (internal/templates/*.html) which are likewise unformatted and unchecked.Stated honestly — partly ambiguous. The same policy scopes the config files narrowly ("Documentation and writing repos (Markdown, HTML, CSS) should also have
.prettierrcand.prettierignore") and lists onlygo.mod,go.sum,.golangci.ymlas the Go-repo minimum. So whether a Go repo must carry prettier config is genuinely unclear. That markdown should be prettier-formatted withproseWrap: alwaysis not ambiguous. Filing at low severity; close as wontfix if the narrow reading is intended.Definition of done
.prettierrc(four-space tabs,proseWrap: always) and.prettierignoreadded..prettierignoremust excludeREPO_POLICIES.md— it is currently byte-identical to canonical (sha256117dde7f148ed3cd693b333312f6345a0a0ee84fadbbe5cca559ca6fed4a1775) and reformatting it would break that property, which is the whole point of vendoring it verbatim. Same forCONVENTIONS.mdif it survives #97.script/fmtandscript/fmt-checkextended to run prettier over*.md(and decide whether to include the HTML templates — Go template syntax and prettier do not always agree, so verify rather than assume).EXISTING_REPO_CHECKLIST.md: "Formatting diffs can be large and should not be mixed with functional changes."make checkgreen, and runningmake fmttwice is idempotent.Coordination
The reflow touches
README.mdandTODO.md, both modified by both open PRs. Do last, after #55 and #54 have merged — a repo-wide markdown reflow landing before them would conflict with everything.