Skip to content

Commit 5f280c0

Browse files
FIX (pre-commit): Add pre-commit hooks
1 parent 492605a commit 5f280c0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.pre-commit-config.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Pre-commit configuration
2+
# See https://pre-commit.com for more information
3+
repos:
4+
# Frontend checks
5+
- repo: local
6+
hooks:
7+
- id: frontend-format
8+
name: Frontend Format (Prettier)
9+
entry: powershell -Command "cd frontend; npm run format"
10+
language: system
11+
files: ^frontend/.*\.(ts|tsx|js|jsx|json|css|md)$
12+
pass_filenames: false
13+
14+
- id: frontend-lint
15+
name: Frontend Lint (ESLint)
16+
entry: powershell -Command "cd frontend; npm run lint"
17+
language: system
18+
files: ^frontend/.*\.(ts|tsx|js|jsx)$
19+
pass_filenames: false
20+
21+
# Backend checks
22+
- repo: local
23+
hooks:
24+
- id: backend-format-and-lint
25+
name: Backend Format & Lint (golangci-lint)
26+
entry: powershell -Command "cd backend; golangci-lint fmt; golangci-lint run"
27+
language: system
28+
files: ^backend/.*\.go$
29+
pass_filenames: false

0 commit comments

Comments
 (0)