forked from yamada-ui/yamada-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlefthook.yaml
87 lines (76 loc) · 2.3 KB
/
lefthook.yaml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
pre-commit:
piped: true
commands:
prettier:
priority: 1
glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts,md,mdx,yaml,yml,json,html,css}"
run: |
pnpm prettier {staged_files} --write
stage_fixed: true
eslint:
priority: 2
run: |
pnpm lefthook run eslint
eslint:
parallel: true
commands:
base:
glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts}"
exclude:
- examples/**
- docs/**
run: |
pnpm eslint {staged_files} --max-warnings=0 --fix --cache --flag unstable_ts_config
stage_fixed: true
docs:
root: docs/
glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts}"
run: |
pnpm eslint {staged_files} --max-warnings=0 --fix --cache --flag unstable_ts_config
stage_fixed: true
create-react-app:
root: examples/vite/
glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts}"
run: |
pnpm eslint {staged_files} --max-warnings=0 --fix --cache --flag unstable_ts_config
stage_fixed: true
hono:
root: examples/vite/
glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts}"
run: |
pnpm eslint {staged_files} --max-warnings=0 --fix --cache --flag unstable_ts_config
stage_fixed: true
vite:
root: examples/vite/
glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts}"
run: |
pnpm eslint {staged_files} --max-warnings=0 --fix --cache --flag unstable_ts_config
stage_fixed: true
remix:
root: examples/remix/
glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts}"
run: |
pnpm eslint {staged_files} --max-warnings=0 --fix --cache --flag unstable_ts_config
stage_fixed: true
next-app:
root: examples/next/app/
glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts}"
run: |
pnpm eslint {staged_files} --max-warnings=0 --fix --cache --flag unstable_ts_config
stage_fixed: true
next-pages:
root: examples/next/pages/
glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,d.ts}"
run: |
pnpm eslint {staged_files} --max-warnings=0 --fix --cache --flag unstable_ts_config
stage_fixed: true
commit-msg:
commands:
commitlint:
run: |
pnpm commitlint --edit {1}
post-merge:
commands:
pnpm:
glob: "{package.json,pnpm-lock.yaml}"
run: pnpm install