-
-
Notifications
You must be signed in to change notification settings - Fork 87
/
lefthook.yml
50 lines (48 loc) · 1.12 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
commit-msg:
commands:
lint-commit-msg:
run: npx commitlint --edit
pre-commit:
commands:
js-linter:
priority: 1
glob: "**/*.{js,jsx,ts,tsx}"
run: npm run lint
rust-linter:
priority: 2
glob: "**/*.rs"
run: cargo fmt -- --check
pre-hook:
priority: 3
glob: "**/*.rs"
run: rust-script ./scripts/lefthook/pre_hook.rs
rust-code-check:
priority: 4
glob: "**/*.rs"
run: cargo clippy -- -D warnings
build-schemas:
priority: 5
glob: "**/*.rs"
run: npm run build:schemas && git add documentation/schemas/*.schema.json
post-hook:
priority: 6
glob: "**/*.rs"
run: rust-script ./scripts/lefthook/post_hook.rs
pre-push:
commands:
js-test:
priority: 1
glob: "**/*.{js,jsx,ts,tsx}"
run: npm run test
pre-hook:
priority: 2
glob: "**/*.rs"
run: rust-script ./scripts/lefthook/pre_hook.rs
rust-test:
priority: 3
glob: "**/*.rs"
run: cargo test
post-hook:
priority: 4
glob: "**/*.rs"
run: rust-script ./scripts/lefthook/post_hook.rs