make fmt rewrites vendored static/js/alpine.min.js (missing .prettierignore) #185

Open
opened 2026-08-07 18:47:54 +02:00 by clawbot · 0 comments
Collaborator

Found while working #175: running make fmt reformats
static/js/alpine.min.jsscript/fmt passes the glob
static/js/*.js to prettier and there is no .prettierignore, so
the vendored minified Alpine.js bundle gets expanded/rewritten.
Vendored artifacts must never be reformatted; a formatter pass
should leave the tree identical unless first-party code changed.

Remediation: add a .prettierignore containing at least
static/js/alpine.min.js (or *.min.js). Verify script/fmt's
explicit file arguments still respect the ignore file (prettier
requires --ignore-path handling to be confirmed when files are
passed explicitly); if not, adjust the glob in script/fmt to
exclude minified files.

Definition of done:

  • make fmt on a clean tree produces zero modifications
    (git status clean afterward)
  • static/js/alpine.min.js byte-identical before and after
    make fmt
  • first-party JS (dashboard.js, deployment.js, utils.js) is
    still formatted
  • lands via PR from a feature branch off main
Found while working #175: running `make fmt` reformats `static/js/alpine.min.js` — `script/fmt` passes the glob `static/js/*.js` to prettier and there is no `.prettierignore`, so the vendored minified Alpine.js bundle gets expanded/rewritten. Vendored artifacts must never be reformatted; a formatter pass should leave the tree identical unless first-party code changed. Remediation: add a `.prettierignore` containing at least `static/js/alpine.min.js` (or `*.min.js`). Verify `script/fmt`'s explicit file arguments still respect the ignore file (prettier requires `--ignore-path` handling to be confirmed when files are passed explicitly); if not, adjust the glob in `script/fmt` to exclude minified files. Definition of done: - `make fmt` on a clean tree produces zero modifications (`git status` clean afterward) - `static/js/alpine.min.js` byte-identical before and after `make fmt` - first-party JS (`dashboard.js`, `deployment.js`, `utils.js`) is still formatted - lands via PR from a feature branch off `main`
clawbot added this to the 1.1.0 milestone 2026-08-07 18:47:54 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/upaas#185