-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yml
More file actions
29 lines (28 loc) · 888 Bytes
/
Copy pathlefthook.yml
File metadata and controls
29 lines (28 loc) · 888 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
pre-commit:
parallel: true
commands:
cargo-fmt:
glob: "*.rs"
run: cargo fmt --all -- --check
cargo-clippy:
glob: "*.rs"
run: cargo clippy --workspace --all-targets -- -D warnings
prettier:
glob: "apps/desktop/**/*.{ts,tsx,js,jsx,css,json,md}"
root: "apps/desktop"
run: pnpm exec prettier --check {staged_files}
eslint:
glob: "apps/desktop/**/*.{ts,tsx}"
root: "apps/desktop"
run: pnpm exec eslint {staged_files}
typecheck:
glob: "apps/desktop/**/*.{ts,tsx}"
run: pnpm -F desktop typecheck
commit-msg:
commands:
conventional:
run: |
head -n1 {1} | grep -qE '^(feat|fix|chore|docs|refactor|test|perf|build|ci|style|revert)(\([a-z0-9._-]+\))?!?: .+' || {
echo "Commit message must follow Conventional Commits (feat:, fix:, chore:, ...)"
exit 1
}