Markdown is never formatted: make fmt and fmt-check skip prettier #23

Closed
opened 2026-10-06 08:28:36 +02:00 by clawbot · 0 comments
Collaborator

make fmt and make fmt-check cover only Go files. REPO_POLICIES.md asks for prettier on Markdown with four-space indents and proseWrap: always, the settings all of sneak's repositories share, and the model script/fmt and script/fmt-check in sneak/prompts run exactly that. Here nothing formats or checks README.md, TODO.md or any other Markdown file, so every change to them lands unformatted.

Implementation

  • Add prettier the way REPO_POLICIES.md at sneak/prompts commit dd4027b describes it: package.json and yarn.lock with prettier pinned; script/bootstrap installs the pinned node (through nvm from a hash-verified release, never curl | sh) and yarn via corepack, comparing versions rather than testing presence; .prettierrc and .prettierignore from that commit.
  • script/fmt also runs prettier --write on **/*.md; script/fmt-check also runs prettier --check, resolving yarn the way the model scripts do. The Go formatting stays as it is.
  • Run make fmt once and commit the reformatted Markdown in the same change. A vendored file that comes out changed is listed in .prettierignore instead of being edited.
  • TODO.md and README.md updated in the same change.

Definition of done

  • A planted unwrapped Markdown paragraph makes make fmt-check fail; make fmt fixes it.
  • script/cibuild passes on a runner with only docker and git (it runs script/bootstrap first).
  • make check and script/cibuild pass. PR to next, independent review, squash.

Model: opus-5-5

`make fmt` and `make fmt-check` cover only Go files. `REPO_POLICIES.md` asks for prettier on Markdown with four-space indents and `proseWrap: always`, the settings all of sneak's repositories share, and the model `script/fmt` and `script/fmt-check` in `sneak/prompts` run exactly that. Here nothing formats or checks `README.md`, `TODO.md` or any other Markdown file, so every change to them lands unformatted. ## Implementation - Add prettier the way `REPO_POLICIES.md` at `sneak/prompts` commit `dd4027b` describes it: `package.json` and `yarn.lock` with prettier pinned; `script/bootstrap` installs the pinned node (through nvm from a hash-verified release, never `curl | sh`) and yarn via corepack, comparing versions rather than testing presence; `.prettierrc` and `.prettierignore` from that commit. - `script/fmt` also runs `prettier --write` on `**/*.md`; `script/fmt-check` also runs `prettier --check`, resolving yarn the way the model scripts do. The Go formatting stays as it is. - Run `make fmt` once and commit the reformatted Markdown in the same change. A vendored file that comes out changed is listed in `.prettierignore` instead of being edited. - `TODO.md` and `README.md` updated in the same change. ## Definition of done - A planted unwrapped Markdown paragraph makes `make fmt-check` fail; `make fmt` fixes it. - `script/cibuild` passes on a runner with only docker and git (it runs `script/bootstrap` first). - `make check` and `script/cibuild` pass. PR to `next`, independent review, squash. Model: opus-5-5
Sign in to join this conversation.