Skip to content

Commit 459e4db

Browse files
committed
check: cache prettier and eslint results
Both re-lint every file on every run. Measured on this repo: prettier 19.5s, eslint 108s. Neither result changes for a file that has not changed, so both keep a cache keyed on content. Warm: prettier 7.1s, eslint 2.4s -- a full lint goes from ~127s to ~4.3s. Cold cost is unchanged, so CI (fresh checkout, no cache) is unaffected; this buys back the local edit-check loop.
1 parent 58f2e0a commit 459e4db

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ tmp/
3131

3232
# Browser walkthrough harness screenshots + run summary (CL-6072)
3333
scripts/e2e/browser/shots/
34+
35+
# Lint caches — local only; CI installs fresh and rebuilds them.
36+
.eslintcache

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"check": "bun run typecheck && bun run lint && bun run test && bun run check:structural",
1515
"check:all": "bun run check && bun run check:packages",
1616
"typecheck": "bun run scripts/run-all.ts typecheck",
17-
"lint": "prettier --check . && eslint .",
17+
"lint": "prettier --check --cache . && eslint --cache .",
1818
"format": "prettier --write .",
1919
"build": "bun run scripts/run-all.ts build",
2020
"test": "bun test scripts/run-all.test.ts && bun run scripts/run-all.ts test",

0 commit comments

Comments
 (0)