Files
upaas/script/fmt
sneak 214df3976f
Check / check (pull_request) Skipped
Add root .prettierrc pinning prettier settings (closes #197)
Add a root `.prettierrc` (JSON) with `tabWidth: 4` and
`proseWrap: always`, the shared house style, so prettier formatting no
longer depends on host prettier defaults. Drop the now-redundant inline
`--tab-width 4` from `script/fmt` so the config file is the single
source of truth; `script/fmt` still formats only `static/js/*.js` and
`.prettierignore` still keeps the vendored `alpine.min.js` out.

Verified `make fmt` on a clean tree is a no-op: all first-party JS
reports unchanged and the vendored bundle is untouched.

Model: opus-4-8
2026-09-22 10:34:13 +00:00

15 lines
219 B
Bash
Executable File

#!/bin/sh
# script/fmt: format all files (writes).
set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
main() {
cd "$ROOT"
gofmt -s -w .
goimports -w .
npx prettier --write static/js/*.js
}
main "$@"