-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathlefthook.yml
34 lines (33 loc) · 942 Bytes
/
lefthook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
assert_lefthook_installed: true
pre-commit:
parallel: true
commands:
backend-sqlx-prepare:
root: "backend/"
glob: "*.rs"
run: cargo sqlx prepare -- --all-targets --all-features && git add .sqlx
backend-formatter:
root: "backend/"
glob: "*.rs"
run: cargo fmt
stage_fixed: true
backend-linter:
root: "backend/"
glob: "*.rs"
run: cargo clippy --all-targets --all-features -- -D warnings
backend-openapi:
root: "backend/"
glob: "*.rs"
run: cargo run --package abacus --bin gen-openapi && git add openapi.json
frontend-formatter:
root: "frontend/"
run: npx prettier --ignore-unknown --write {staged_files}
stage_fixed: true
frontend-typescript:
root: "frontend/"
glob: "*.{ts,tsx}"
run: npx tsc
frontend-linter:
root: "frontend/"
glob: "*.{ts,tsx}"
run: npm run lint {staged_files}