document that bun format touches every dirty file
The script globs `git diff --name-only HEAD`, so running it after a small change also reformatted an unrelated file the owner had in progress — whitespace churn landing in someone else's diff with no explanation. Point at `bunx prettier --write <paths>` instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -111,13 +111,18 @@ bun dev # the whole app — SPA + API + WebSockets, watched
|
|||||||
bun start # production
|
bun start # production
|
||||||
bunx tsgo # typecheck (not tsc)
|
bunx tsgo # typecheck (not tsc)
|
||||||
bun test # tests
|
bun test # tests
|
||||||
bun format # prettier over changed files only
|
bun format # prettier over every dirty file — see the note below before running it
|
||||||
bun db:push # apply the schema to Postgres
|
bun db:push # apply the schema to Postgres
|
||||||
bun setup # guided install (writes .env, incl. PUBLIC_BUILD_ENV=production)
|
bun setup # guided install (writes .env, incl. PUBLIC_BUILD_ENV=production)
|
||||||
```
|
```
|
||||||
|
|
||||||
Sidecar control: `bun run start:sidecar` / `stop:sidecar` / `restart:sidecar` / `logs:sidecar`.
|
Sidecar control: `bun run start:sidecar` / `stop:sidecar` / `restart:sidecar` / `logs:sidecar`.
|
||||||
|
|
||||||
|
**Format your own files, not the whole dirty tree.** `bun format` globs `git diff --name-only HEAD`,
|
||||||
|
so it rewrites every uncommitted file — including work in progress that isn't yours, which then shows
|
||||||
|
up as unexplained whitespace churn in someone else's diff. Run `bunx prettier --write <paths>` on the
|
||||||
|
files you actually touched. `bun format` is only safe when the tree is otherwise clean.
|
||||||
|
|
||||||
Note: `build:editor*` in `package.json` points at `scripts/build/editor.ts`, which does not exist.
|
Note: `build:editor*` in `package.json` points at `scripts/build/editor.ts`, which does not exist.
|
||||||
|
|
||||||
## Code Style
|
## Code Style
|
||||||
|
|||||||
Reference in New Issue
Block a user