Format Markdown with prettier in script/fmt and script/fmt-check (refs #7)
check / check (push) Failing after 4m19s

script/fmt now also runs prettier over every Markdown file, and
script/fmt-check checks them without writing. prettier is pinned in
package.json and yarn.lock. script/bootstrap keeps its Go and apt
handling and gains the canonical pinned node (nvm from a hash-checked
archive) and yarn (corepack) install, then installs the locked
packages. Both fmt scripts find yarn the canonical way, sourcing nvm
when yarn is not on PATH. The new files and the yarn lookup come from
sneak/prompts at cc440118c876. The vendored REPO_POLICIES.md already
passes prettier, so it is not ignored. The Markdown is reformatted in
the next commit.

Deviation: package.json drops the canonical "license": "MIT" line; this
repo is WTFPL.

Model: opus-5-5
This commit is contained in:
2026-10-06 06:30:59 +00:00
parent 17b6b84322
commit 47e48a2529
9 changed files with 156 additions and 9 deletions
+8 -4
View File
@@ -36,7 +36,8 @@ Primary development happens on a privately-run Gitea instance at
issues are [tracked
there](https://git.eeqj.de/sneak/bsdaily/issues).
Changes must always be formatted with a standard `go fmt`, syntactically
Changes must always be formatted with `make fmt` (`go fmt` for Go,
prettier for Markdown), syntactically
valid, and must pass the linting defined in the repository (presently the
`golangci-lint` defaults), which can be run with a `make lint`. The `main`
branch is protected and all changes must be made via [pull
@@ -54,7 +55,8 @@ development workflow, and the Makefile targets are thin shims that call
them. We provide:
- `script/bootstrap` — install all development dependencies (go, Go
module download); the linter is not installed on the host
module download, a pinned node and yarn, and the prettier pinned in
`package.json` and `yarn.lock`); the linter is not installed on the host
- `script/setup` — make a fresh clone ready for development: runs
`script/bootstrap`, then `script/install-precommit`
- `script/projectname` — print the project name (used for the Docker
@@ -63,8 +65,10 @@ them. We provide:
test suite with `-race` (verbose rerun on failure)
- `script/lint` — build the Dockerfile's `lint` phase, which runs
`golangci-lint run ./...`
- `script/fmt` — format the Go code with `go fmt` (writes)
- `script/fmt-check` — check the Go formatting with `gofmt` (read-only)
- `script/fmt` — format the Go code with `go fmt` and every Markdown
file with prettier (writes)
- `script/fmt-check` — check the Go formatting with `gofmt` and the
Markdown formatting with prettier (read-only)
- `script/check` — run `script/test`, `script/lint`, and
`script/fmt-check`
- `script/docker` — build the Docker image tagged via