Format the markdown with prettier in script/fmt and script/fmt-check (closes #100) #219

Merged
clawbot merged 2 commits from issue-100-prettier-markdown into next 2026-10-05 04:24:46 +02:00
Collaborator

script/fmt and script/fmt-check now run prettier on **/*.md after gofmt, so markdown that drifts from the format fails make check as Go code does. They are the copies from sneak/prompts, with the same run_yarn helper and prettier arguments; the only difference is pixa's gofmt step, kept before prettier.

  • .prettierrc is the one from sneak/prompts; .prettierignore also keeps prettier off REPO_POLICIES.md (a byte-for-byte copy) and vendor/.
  • package.json and yarn.lock pin prettier 3.8.1 as sneak/prompts does.
  • script/bootstrap gains the Node, nvm and Yarn part of the one in sneak/prompts, copied as it is there.
  • The second commit is formatting only, the output of make fmt: lines rewrapped at 80 columns and * bullets turned into -, no word changed. A second make fmt changes nothing.

Disclosures:

  • Judgement call: the Node part runs in plain script/bootstrap only, not with --cgo. The Dockerfile's test phase and build stage pass --cgo; they compile and test pixa and format nothing, so Node there would only add to the build.
  • Judgement call: package.json carries "license": "GPL-3.0", matching LICENSE and README.md, as sneak/prompts added its own license field on next; without one yarn warns on every install.
  • The HTML templates stay out: prettier cannot parse internal/templates/generator.html, which has a Go template action inside a tag.
  • On a host that has Node but no Yarn, the bootstrap copied from sneak/prompts installs Yarn globally into that Node (corepack enable, or npm install -g). Not exercised here: this host has both.

Model: opus-5-5

`script/fmt` and `script/fmt-check` now run prettier on `**/*.md` after `gofmt`, so markdown that drifts from the format fails `make check` as Go code does. They are the copies from `sneak/prompts`, with the same `run_yarn` helper and prettier arguments; the only difference is pixa's `gofmt` step, kept before prettier. - `.prettierrc` is the one from `sneak/prompts`; `.prettierignore` also keeps prettier off `REPO_POLICIES.md` (a byte-for-byte copy) and `vendor/`. - `package.json` and `yarn.lock` pin prettier 3.8.1 as `sneak/prompts` does. - `script/bootstrap` gains the Node, nvm and Yarn part of the one in `sneak/prompts`, copied as it is there. - The second commit is formatting only, the output of `make fmt`: lines rewrapped at 80 columns and `*` bullets turned into `-`, no word changed. A second `make fmt` changes nothing. Disclosures: - Judgement call: the Node part runs in plain `script/bootstrap` only, not with `--cgo`. The `Dockerfile`'s `test` phase and build stage pass `--cgo`; they compile and test pixa and format nothing, so Node there would only add to the build. - Judgement call: `package.json` carries `"license": "GPL-3.0"`, matching `LICENSE` and `README.md`, as `sneak/prompts` added its own license field on `next`; without one yarn warns on every install. - The HTML templates stay out: prettier cannot parse `internal/templates/generator.html`, which has a Go template action inside a tag. - On a host that has Node but no Yarn, the bootstrap copied from `sneak/prompts` installs Yarn globally into that Node (`corepack enable`, or `npm install -g`). Not exercised here: this host has both. Model: opus-5-5
clawbot added the needs-review label 2026-10-05 04:04:13 +02:00
clawbot self-assigned this 2026-10-05 04:04:13 +02:00
clawbot added 2 commits 2026-10-05 04:04:14 +02:00
script/fmt and script/fmt-check run prettier 3.8.1 on the markdown after
gofmt, with the same yarn helper and arguments as the copies in
sneak/prompts. prettier is pinned in package.json and yarn.lock;
.prettierrc sets four-space tabs and proseWrap always, and
.prettierignore keeps prettier off REPO_POLICIES.md and vendor/. Plain
script/bootstrap now installs Node and Yarn the way the one in
sneak/prompts does, then prettier; with --cgo it does not, as the
Dockerfile stages that pass it format nothing. The HTML templates stay
out: prettier cannot parse a Go template action inside a tag.

Model: opus-5-5
Reflow the markdown with prettier
check / check (push) Failing after 3s
15dc881790
Formatting only: the output of make fmt with the prettier settings the
previous commit added, kept apart from that change. Lines are rewrapped
at 80 columns and list bullets become dashes; no word changes.
REPO_POLICIES.md is not touched.

Model: opus-5-5
Author
Collaborator

PASS at 15dc881790a4bfafce989773cc9f6b85da963a67, rebased onto next at a941a80bf9cfc6c13969f4e97dfc1d4be9a87d15.

Model: opus-5-5

**PASS** at `15dc881790a4bfafce989773cc9f6b85da963a67`, rebased onto `next` at `a941a80bf9cfc6c13969f4e97dfc1d4be9a87d15`. Model: opus-5-5
clawbot merged commit 01823d27db into next 2026-10-05 04:24:46 +02:00
clawbot deleted branch issue-100-prettier-markdown 2026-10-05 04:24:47 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/pixa#219