Vendor canonical prettier/format toolchain from the prompts scaffold #203

Closed
opened 2026-09-22 14:15:50 +02:00 by clawbot · 1 comment
Collaborator

Supersedes #197 and the closed PR #202.

Prettier formatting in upaas is non-deterministic: script/fmt runs npx prettier (an unpinned host tool) with an inline --tab-width 4, and there is no .prettierrc. The canonical prompts scaffold (sneak/prompts) already owns the format toolchain — .prettierrc (tabWidth: 4, proseWrap: always), .prettierignore, package.json + yarn.lock with a pinned prettier, and a script/fmt/script/bootstrap that resolve the pinned prettier via nvm. Per the owner ruling of 2026-09-22 (given on vaultik PR 114, now global memory), format/lint config is vendored from that scaffold rather than hand-authored per repo. This unit vendors it into upaas.

Definition of done

  • Vendor .prettierrc from sneak/prompts verbatim (tabWidth: 4, proseWrap: always).
  • Vendor the pinned prettier toolchain: package.json + yarn.lock matching the scaffold's pin, and update script/bootstrap to install the pinned node/yarn the way the scaffold's script/bootstrap does (hash-verified nvm release archive; never curl | sh). Prettier must no longer be an unpinned npx host tool; this also satisfies the REPO_POLICIES hash-pinning rule.
  • Update script/fmt to run the pinned prettier against the config file (drop the inline --tab-width), over both first-party JS (static/js/*.js) and markdown (**/*.md). Keep gofmt/goimports unchanged.
  • .prettierignore: keep the scaffold's entries and retain the repo-specific *.min.js line (upaas vendors static/js/alpine.min.js, which the scaffold does not). This per-repo file list is legitimate repo-local content, not a config-behavior edit.
  • Reflowing existing markdown to house style is expected and is part of this unit; commit the reflow. Afterward make fmt on a clean tree produces zero further modifications, and static/js/alpine.min.js stays byte-identical.
  • make check (Docker gate, lint executed) stays green.

Unmilestoned hygiene; does not gate a release. Lands via PR from a feature branch off the current freeze target (next2 while the 1.1.0 milestone PR is awaiting merge).

Model: opus-4-8

Supersedes https://git.eeqj.de/sneak/upaas/issues/197 and the closed PR https://git.eeqj.de/sneak/upaas/pulls/202. Prettier formatting in upaas is non-deterministic: `script/fmt` runs `npx prettier` (an unpinned host tool) with an inline `--tab-width 4`, and there is no `.prettierrc`. The canonical prompts scaffold (`sneak/prompts`) already owns the format toolchain — `.prettierrc` (`tabWidth: 4`, `proseWrap: always`), `.prettierignore`, `package.json` + `yarn.lock` with a pinned prettier, and a `script/fmt`/`script/bootstrap` that resolve the pinned prettier via nvm. Per the owner ruling of 2026-09-22 (given on vaultik PR 114, now global memory), format/lint config is vendored from that scaffold rather than hand-authored per repo. This unit vendors it into upaas. ## Definition of done - Vendor `.prettierrc` from `sneak/prompts` verbatim (`tabWidth: 4`, `proseWrap: always`). - Vendor the pinned prettier toolchain: `package.json` + `yarn.lock` matching the scaffold's pin, and update `script/bootstrap` to install the pinned node/yarn the way the scaffold's `script/bootstrap` does (hash-verified nvm release archive; never `curl | sh`). Prettier must no longer be an unpinned `npx` host tool; this also satisfies the REPO_POLICIES hash-pinning rule. - Update `script/fmt` to run the pinned prettier against the config file (drop the inline `--tab-width`), over both first-party JS (`static/js/*.js`) and markdown (`**/*.md`). Keep `gofmt`/`goimports` unchanged. - `.prettierignore`: keep the scaffold's entries and retain the repo-specific `*.min.js` line (upaas vendors `static/js/alpine.min.js`, which the scaffold does not). This per-repo file list is legitimate repo-local content, not a config-behavior edit. - Reflowing existing markdown to house style is expected and is part of this unit; commit the reflow. Afterward `make fmt` on a clean tree produces zero further modifications, and `static/js/alpine.min.js` stays byte-identical. - `make check` (Docker gate, lint executed) stays green. Unmilestoned hygiene; does not gate a release. Lands via PR from a feature branch off the current freeze target (`next2` while the 1.1.0 milestone PR is awaiting merge). Model: opus-4-8
Author
Collaborator

Done in PR #204 (base next2).

Vendored the format toolchain from the sneak/prompts scaffold: .prettierrc (tabWidth 4, proseWrap always), pinned package.json + yarn.lock (prettier 3.8.1), and a .prettierignore unioning the scaffold entries with the repo's *.min.js rule. script/bootstrap now installs a pinned node/yarn from a hash-verified nvm archive (no curl-pipe-sh); script/fmt runs the pinned prettier via the config file (no inline flags) over static/js/*.js and **/*.md, keeping gofmt/goimports. All markdown reflowed to house style; make fmt on a clean tree yields no further changes and static/js/alpine.min.js is byte-identical. make check passes.

Model: opus-4-8

Done in PR https://git.eeqj.de/sneak/upaas/pulls/204 (base `next2`). Vendored the format toolchain from the `sneak/prompts` scaffold: `.prettierrc` (tabWidth 4, proseWrap always), pinned `package.json` + `yarn.lock` (prettier 3.8.1), and a `.prettierignore` unioning the scaffold entries with the repo's `*.min.js` rule. `script/bootstrap` now installs a pinned node/yarn from a hash-verified nvm archive (no curl-pipe-sh); `script/fmt` runs the pinned prettier via the config file (no inline flags) over `static/js/*.js` and `**/*.md`, keeping gofmt/goimports. All markdown reflowed to house style; `make fmt` on a clean tree yields no further changes and `static/js/alpine.min.js` is byte-identical. `make check` passes. Model: opus-4-8
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/upaas#203