-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yml
More file actions
34 lines (30 loc) · 786 Bytes
/
lefthook.yml
File metadata and controls
34 lines (30 loc) · 786 Bytes
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
pre-commit:
piped: true
commands:
cspell:
priority: 1
glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,yml,yaml,md,mdx,json}"
exclude: "pnpm-lock.yaml"
run: |
pnpm cspell "{staged_files}" --cache
prettier:
priority: 2
glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,yml,yaml,md,mdx,json,html,css}"
run: |
pnpm prettier "{staged_files}" --write
stage_fixed: true
lint:
priority: 3
glob: "*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}"
run: |
pnpm eslint "{staged_files}" --max-warnings=0 --fix --cache
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