-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathlefthook.yml
More file actions
47 lines (46 loc) · 1.31 KB
/
lefthook.yml
File metadata and controls
47 lines (46 loc) · 1.31 KB
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
44
45
46
47
assert_lefthook_installed: true
pre-commit:
parallel: true
commands:
backend-sqlx-prepare:
root: "backend/"
glob: "*.rs"
run: >
cargo sqlx database reset -y -D sqlite://sqlx-cache-tmp.sqlite &&
cargo sqlx prepare -D sqlite://sqlx-cache-tmp.sqlite -- --all-targets &&
git add .sqlx &&
rm sqlx-cache-tmp.sqlite
backend-formatter:
root: "backend/"
glob: "*.rs"
run: cargo fmt
stage_fixed: true
backend-linter:
root: "backend/"
glob: "*.rs"
run: cargo clippy --all-targets -- -D warnings
backend-openapi:
root: "backend/"
glob: "*.rs"
run: >
cargo run --package abacus --bin gen-openapi &&
git add openapi.json &&
cd ../frontend &&
pnpm gen:openapi &&
git add src/types/generated/openapi.ts
frontend-formatter:
root: "frontend/"
run: pnpm format --staged --no-errors-on-unmatched --colors=off
stage_fixed: true
frontend-lint-biome:
root: "frontend/"
run: pnpm lint:biome --write --no-errors-on-unmatched --colors=off
stage_fixed: true
frontend-lint-tsc:
root: "frontend/"
glob: "*.{ts,tsx}"
run: pnpm lint:tsc
frontend-lint-eslint:
root: "frontend/"
glob: "*.{ts,tsx}"
run: pnpm lint:eslint