-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlefthook.yml
More file actions
43 lines (35 loc) · 935 Bytes
/
Copy pathlefthook.yml
File metadata and controls
43 lines (35 loc) · 935 Bytes
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
35
36
37
38
39
40
41
42
43
# Lefthook configuration for ckbadger
# Install: pnpm add -D lefthook && pnpm lefthook install
pre-commit:
parallel: true
commands:
rust-fmt:
glob: '*.rs'
run: cargo fmt --all -- --check
stage_fixed: true
rust-clippy:
glob: '*.rs'
run: cargo clippy --all-targets -- -D warnings
frontend-lint:
root: frontend/
glob: '*.{js,jsx,ts,tsx}'
run: pnpm lint --fix
stage_fixed: true
frontend-typecheck:
root: frontend/
glob: '*.{ts,tsx}'
run: pnpm type-check
prettier:
glob: '*.{js,jsx,ts,tsx,json,md,yml,yaml,css}'
run: pnpm prettier --write {staged_files}
stage_fixed: true
pre-push:
parallel: true
commands:
rust-test:
run: cargo test --lib
frontend-test:
root: frontend/
run: npx vitest run
# Skip hooks with: git commit --no-verify / git push --no-verify
# Or set: LEFTHOOK=0 git commit