-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathlefthook.yml
46 lines (43 loc) · 1.09 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
lint_glob: &lint_glob "*.{js,jsx,ts,tsx,cjs,mjs}"
prettier_glob: &prettier_glob "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc,md,mdx}"
pre-commit:
parallel: false
commands:
lint:
glob: *lint_glob
run: bunx eslint --fix {staged_files}
lint-add:
glob: *lint_glob
run: git add {staged_files}
prettier:
glob: *prettier_glob
run: bunx prettier --log-level warn --write {staged_files}
prettier-add:
glob: *prettier_glob
run: git add {staged_files}
typecheck:
run: bunx tsc
check-links:
run: bun run check-links {staged_files}
pre-build:
parallel: true
commands:
lint:
glob: *lint_glob
run: bunx eslint {all_files}
prettier:
glob: *prettier_glob
run: bunx prettier --log-level warn --check {all_files}
typecheck:
run: bunx tsc
check-links:
run: bun run check-links {all_files}
fix:
parallel: false
commands:
lint:
glob: *lint_glob
run: next lint --fix .
prettier:
glob: *prettier_glob
run: bunx prettier --log-level silent --write ./src