Vendor pinned prettier/format toolchain from prompts scaffold (closes #203) #204

Merged
clawbot merged 1 commits from issue-203-vendor-prettier-toolchain into next2 2026-09-22 14:43:08 +02:00
Collaborator

Supersedes closed PR #202 and issue #197.

script/fmt ran unpinned npx prettier with an inline --tab-width 4 and no config file, so formatting was not reproducible across machines. This vendors the canonical format toolchain from the sneak/prompts scaffold so prettier is pinned and read from a config file.

What changed:

  • Added .prettierrc (tabWidth 4, proseWrap always), package.json, and yarn.lock pinning prettier 3.8.1.
  • .prettierignore now unions the scaffold entries (node_modules/, yarn.lock) with the repo's existing *.min.js rule that protects the vendored static/js/alpine.min.js.
  • script/bootstrap installs a pinned node/yarn under nvm from a hash-verified release archive (no curl-pipe-sh), then installs the locked prettier. The existing Go/goimports/docker steps are unchanged.
  • script/fmt runs the pinned prettier via .prettierrc (no inline flags) over static/js/*.js and **/*.md, keeping gofmt/goimports.

All existing markdown was reflowed to house style (proseWrap always, 4-space) as part of this change. On a clean tree make fmt now makes no further changes, and static/js/alpine.min.js is byte-identical.

Judgement call: make check (test, Docker lint, gofmt-check) passed but does not gate prettier; the linter emits a pre-existing gomodguard deprecation warning, unrelated to this change and left as-is.

Base is next2 (next is frozen for the 1.1.0 milestone).

Model: opus-4-8

Supersedes closed PR https://git.eeqj.de/sneak/upaas/pulls/202 and issue https://git.eeqj.de/sneak/upaas/issues/197. `script/fmt` ran unpinned `npx prettier` with an inline `--tab-width 4` and no config file, so formatting was not reproducible across machines. This vendors the canonical format toolchain from the `sneak/prompts` scaffold so prettier is pinned and read from a config file. What changed: - Added `.prettierrc` (tabWidth 4, proseWrap always), `package.json`, and `yarn.lock` pinning prettier 3.8.1. - `.prettierignore` now unions the scaffold entries (`node_modules/`, `yarn.lock`) with the repo's existing `*.min.js` rule that protects the vendored `static/js/alpine.min.js`. - `script/bootstrap` installs a pinned node/yarn under nvm from a hash-verified release archive (no curl-pipe-sh), then installs the locked prettier. The existing Go/goimports/docker steps are unchanged. - `script/fmt` runs the pinned prettier via `.prettierrc` (no inline flags) over `static/js/*.js` and `**/*.md`, keeping gofmt/goimports. All existing markdown was reflowed to house style (proseWrap always, 4-space) as part of this change. On a clean tree `make fmt` now makes no further changes, and `static/js/alpine.min.js` is byte-identical. Judgement call: `make check` (test, Docker lint, gofmt-check) passed but does not gate prettier; the linter emits a pre-existing `gomodguard` deprecation warning, unrelated to this change and left as-is. Base is `next2` (`next` is frozen for the 1.1.0 milestone). Model: opus-4-8
clawbot added the needs-review label 2026-09-22 14:23:07 +02:00
clawbot self-assigned this 2026-09-22 14:23:07 +02:00
clawbot added 1 commit 2026-09-22 14:23:07 +02:00
Replace the unpinned `npx prettier --tab-width 4` in `script/fmt` with the
canonical toolchain vendored from `sneak/prompts`: `.prettierrc` (tabWidth 4,
proseWrap always), pinned `package.json` + `yarn.lock` (prettier 3.8.1), and a
`.prettierignore` that unions the scaffold entries with the repo's `*.min.js`
line. `script/bootstrap` now installs a pinned node/yarn via a hash-verified
nvm release archive (never curl-pipe-sh), so prettier stops being an unpinned
host tool. `script/fmt` runs the pinned prettier via `.prettierrc` over
`static/js/*.js` and `**/*.md`, keeping gofmt/goimports. All existing markdown
is reflowed to house style; `static/js/alpine.min.js` stays byte-identical.

Model: opus-4-8
Author
Collaborator

PASS. Rebased on next2: .prettierrc is byte-identical to the sneak/prompts scaffold; package.json/yarn.lock match the scaffold and pin prettier 3.8.1 with an integrity hash; script/bootstrap installs node/yarn from a hash-verified nvm archive (sha256 matches both the scaffold and the real download, no curl-pipe-sh); script/fmt reads .prettierrc with no inline flags over static/js/*.js and **/*.md while keeping gofmt/goimports; .prettierignore retains *.min.js and static/js/alpine.min.js is byte-identical after the pinned prettier writes; make fmt on the clean tree makes zero further changes and make check is green in Docker with lint executed (the gomodguard deprecation warning is pre-existing, emitted by the pinned linter and unrelated to this change); the markdown reflow is pure prettier formatting plus one legitimate new TODO.md entry with no content dropped and no scripted edits; the landing commit carries (closes #203) and a Model: line with no forbidden trailers.

Model: opus-4-8

**PASS.** Rebased on `next2`: `.prettierrc` is byte-identical to the `sneak/prompts` scaffold; `package.json`/`yarn.lock` match the scaffold and pin prettier 3.8.1 with an integrity hash; `script/bootstrap` installs node/yarn from a hash-verified nvm archive (sha256 matches both the scaffold and the real download, no curl-pipe-sh); `script/fmt` reads `.prettierrc` with no inline flags over `static/js/*.js` and `**/*.md` while keeping gofmt/goimports; `.prettierignore` retains `*.min.js` and `static/js/alpine.min.js` is byte-identical after the pinned prettier writes; `make fmt` on the clean tree makes zero further changes and `make check` is green in Docker with lint executed (the `gomodguard` deprecation warning is pre-existing, emitted by the pinned linter and unrelated to this change); the markdown reflow is pure prettier formatting plus one legitimate new `TODO.md` entry with no content dropped and no scripted edits; the landing commit carries `(closes #203)` and a `Model:` line with no forbidden trailers. Model: opus-4-8
clawbot merged commit f4862eb564 into next2 2026-09-22 14:43:08 +02:00
clawbot deleted branch issue-203-vendor-prettier-toolchain 2026-09-22 14:43:08 +02:00
Sign in to join this conversation.