CI (.gitea/workflows/ci.yml): - Cache node_modules keyed on package-lock + .node-version (actions/cache restore/save). An unchanged lockfile now skips `npm ci` (extraction + postinstall folds patch) and just restores the tree. Save runs only on a cache miss and only when install succeeded (`success()`), so a failed `npm ci` can't poison the cache. setup-node's existing `cache: npm` still warms the download cache on the miss path. - Run prettier/eslint/typecheck/tests BEFORE the ~minutes-long build so a format/lint/type/test error fails in seconds instead of after the build. DX (.husky/pre-commit): - Enable the pre-commit hook (`npx lint-staged`). husky + lint-staged were already installed with a config (eslint + `prettier --write` on staged files), just commented out — so formatting kept reaching CI. It's now auto-applied on commit. (typecheck left out of the hook — too slow per commit.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 lines
16 B
Plaintext
2 lines
16 B
Plaintext
npx lint-staged
|