-
Notifications
You must be signed in to change notification settings - Fork 0
/
lefthook.yml
45 lines (43 loc) · 1.26 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
pre-push:
parallel: true
commands:
eslint:
run: pnpm exec eslint src --max-warnings 0
prettier-check:
run: pnpm exec prettier --check "**/*.{js,ts,tsx,css,yml,yaml,json,md}"
typescript-check:
run: pnpm exec tsc --noEmit
terraform-format-check:
run: terraform fmt -check deploy/infra
jest:
run: pnpm exec jest
pre-commit:
parallel: true
commands:
prettier-js:
glob: "*.{js,ts,tsx}"
run: pnpm exec prettier --write {staged_files} && git add {staged_files}
prettier-non-js:
glob: "*.{css,yml,yaml,json,md}"
run: pnpm exec prettier --write --no-bracket-spacing {staged_files} && git add {staged_files}
terraform-format:
glob: "*.{tf,tfvars}"
run: "echo {staged_files} | xargs -n1 -I[] sh -c 'terraform fmt [] && git add []'"
check-all:
parallel: true
commands:
eslint:
tags: frontend
run: pnpm exec eslint src --max-warnings 0
prettier-check:
tags: frontend
run: pnpm exec prettier --check "**/*.{js,ts,tsx,css,yml,yaml,json,md}"
typescript-check:
tags: frontend
run: pnpm exec tsc --noEmit
terraform-format-check:
tags: infra
run: terraform fmt -check deploy/infra
jest:
tags: frontend
run: pnpm test