-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathlefthook.yml
More file actions
59 lines (58 loc) · 1.89 KB
/
lefthook.yml
File metadata and controls
59 lines (58 loc) · 1.89 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
48
49
50
51
52
53
54
55
56
57
58
59
commit-msg:
commands:
commitlint:
run: ./turbo/node_modules/.bin/commitlint --config commitlint.config.mjs --edit "{1}"
pre-commit:
parallel: true
jobs:
- name: turbo
group:
piped: true
jobs:
- name: prettier
run: pnpm prettier --write --ignore-unknown {staged_files}
root: turbo/
glob: "turbo/**/*"
stage_fixed: true
- name: knip
run: pnpm knip --cache
root: turbo/
glob: "turbo/**/*.{js,ts,tsx,jsx,json}"
skip:
- merge
- rebase
fail_text: "Knip found unused code. Run 'cd turbo && pnpm knip' to see details."
timeout: 60
- name: crates
group:
parallel: true
jobs:
- name: cargo-fmt
run: cargo fmt --all
root: crates/
glob: "crates/**/*.{rs,toml}"
stage_fixed: true
- name: cargo-clippy
run: cargo clippy --all-targets --all-features
root: crates/
glob: "crates/**/*.{rs,toml}"
- name: ruff-fmt
run: ruff format .
root: crates/runner/mitm-addon/
glob: "crates/runner/mitm-addon/**/*.py"
stage_fixed: true
- name: ruff-check
run: ruff check --fix .
root: crates/runner/mitm-addon/
glob: "crates/runner/mitm-addon/**/*.py"
stage_fixed: true
- name: check-file-size
run: ./scripts/check-file-size.sh {staged_files}
glob: "**/*"
exclude:
- "turbo/apps/*/public/og-image.png"
- "turbo/apps/*/public/assets/cta-ellipse.png"
- "turbo/apps/*/public/assets/code_illustration.svg"
fail_text: |
File size check failed. Some staged files exceed the 1MB limit.
Run 'git diff --cached --name-only' to see staged files.