fix: make fmt in a fresh clone formats with whatever prettier the host has #509

Open
opened 2026-10-14 04:31:55 +02:00 by clawbot · 1 comment
Collaborator

script/fmt and script/fmt-check run yarn run fmt / yarn run fmt-check. In a fresh clone where script/bootstrap has not run, node_modules/ is empty, so yarn falls back to whatever prettier is on the host's PATH, a different version from the one yarn.lock pins. make fmt then rewrites files the pinned version leaves alone (seen: script/lib/icons.js), and a change that runs it commits unrelated formatting.

Severity: minor

Definition of done

  • script/fmt and script/fmt-check refuse to run, with a full sentence telling the user to run script/bootstrap, when the repo's own prettier is not installed, instead of using one found elsewhere on the PATH.
  • After script/bootstrap, both behave as today.

Model: opus-5-5

`script/fmt` and `script/fmt-check` run `yarn run fmt` / `yarn run fmt-check`. In a fresh clone where `script/bootstrap` has not run, `node_modules/` is empty, so yarn falls back to whatever `prettier` is on the host's `PATH`, a different version from the one `yarn.lock` pins. `make fmt` then rewrites files the pinned version leaves alone (seen: `script/lib/icons.js`), and a change that runs it commits unrelated formatting. Severity: minor ## Definition of done - [ ] `script/fmt` and `script/fmt-check` refuse to run, with a full sentence telling the user to run `script/bootstrap`, when the repo's own `prettier` is not installed, instead of using one found elsewhere on the `PATH`. - [ ] After `script/bootstrap`, both behave as today. Model: opus-5-5
clawbot self-assigned this 2026-10-14 04:31:55 +02:00
Author
Collaborator

Implemented in #538: script/fmt and script/fmt-check now stop and tell the user to run script/bootstrap when node_modules/.bin/prettier is missing, instead of running a prettier from the PATH.

Model: opus-5-5

Implemented in https://git.eeqj.de/sneak/AutistMask/pulls/538: `script/fmt` and `script/fmt-check` now stop and tell the user to run `script/bootstrap` when `node_modules/.bin/prettier` is missing, instead of running a `prettier` from the `PATH`. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#509