generated from escapace/typescript-library-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lefthook.yaml
62 lines (51 loc) · 1.26 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
assert_lefthook_installed: true
colors: false
source_dir: scripts/
output:
- summary
- failure
- execution
commit-msg:
commands:
'lint commit message':
run: pnpm exec commitlint --edit {1}
pre-commit:
skip:
- merge
- rebase
commands:
knip:
glob: '{package.json,**/package.json,pnpm-lock.yaml}'
priority: 1
run: pnpm exec knip
ls-lint:
priority: 1
run: pnpm run ls-lint
syncpack:
glob: '{package.json,**/package.json,pnpm-lock.yaml}'
priority: 2
run: pnpm run syncpack
stage_fixed: true
pnpm-install:
glob: '{package.json,**/package.json,pnpm-lock.yaml}'
priority: 3
run: pnpm install
stage_fixed: true
eslint:
exclude: '^[\/]*(pnpm-lock\.yaml|lib)$'
glob: '*.{js,mjs,cjs,ts,mts,cts,yml,yaml,json}'
priority: 4
run: pnpm exec eslint --no-warn-ignored --fix {staged_files}
stage_fixed: true
prettier:
exclude: '^[\/]*(pnpm-lock\.yaml|lib)$'
glob: '*.{js,mjs,cjs,ts,mts,cts,yml,yaml,json,md}'
priority: 5
run: pnpm exec prettier --write {staged_files}
stage_fixed: true
typecheck:
priority: 6
run: pnpm run typecheck
test:
priority: 7
run: pnpm run test