From 214df3976f7d93885aa79262aeee842e1996630a Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 22 Sep 2026 10:34:13 +0000 Subject: [PATCH] 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 --- .prettierrc | 4 ++++ TODO.md | 4 ++++ script/fmt | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..8af31cd --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "tabWidth": 4, + "proseWrap": "always" +} diff --git a/TODO.md b/TODO.md index ae65dff..aaa3187 100644 --- a/TODO.md +++ b/TODO.md @@ -20,6 +20,10 @@ main cannot regress. # Completed Steps +- 2026-09-22: Added a root `.prettierrc` (`tabWidth: 4`, + `proseWrap: always`) pinning the project prettier settings, and + dropped the now-redundant inline `--tab-width 4` from `script/fmt` so + the config file is the single source of truth (#197). - 2026-09-22: Fixed the flaky `t.TempDir` cleanup race in `internal/service/webhook` by tracking the async deployment goroutine in a `sync.WaitGroup` and exposing `WaitForDeployments`; tests now diff --git a/script/fmt b/script/fmt index 2c9c55c..667cac5 100755 --- a/script/fmt +++ b/script/fmt @@ -8,7 +8,7 @@ main() { cd "$ROOT" gofmt -s -w . goimports -w . - npx prettier --write --tab-width 4 static/js/*.js + npx prettier --write static/js/*.js } main "$@" -- 2.54.0