Skip to content

Commit cc57aad

Browse files
committed
Add pre-commit check script
1 parent f4b17e3 commit cc57aad

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ npm run build # TypeScript check + production build
1414
npm run lint # ESLint check
1515
npm test # Run tests in watch mode (Vitest)
1616
npm run test:run # Run tests once
17+
npm run check # Pre-commit check: tests, lint, build, e2e
1718
```
1819

1920
## Architecture

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"test:run": "vitest run",
1313
"test:e2e": "playwright test e2e/app.spec.ts",
1414
"test:e2e:update": "playwright test e2e/app.spec.ts --update-snapshots",
15-
"screenshot": "npm run build && playwright test e2e/screenshot.spec.ts"
15+
"screenshot": "npm run build && playwright test e2e/screenshot.spec.ts",
16+
"check": "bash scripts/check.sh"
1617
},
1718
"dependencies": {
1819
"date-fns": "^4.1.0",

scripts/check.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "=== Running unit + integration tests ==="
5+
npm run test:run
6+
7+
echo "=== Running lint ==="
8+
npm run lint
9+
10+
echo "=== Running build ==="
11+
npm run build
12+
13+
echo "=== Running e2e tests ==="
14+
npm run test:e2e
15+
16+
echo "=== All checks passed ==="

0 commit comments

Comments
 (0)