-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlefthook.yml
More file actions
39 lines (37 loc) · 1.02 KB
/
Copy pathlefthook.yml
File metadata and controls
39 lines (37 loc) · 1.02 KB
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
min_version: 2.0.0
assert_lefthook_installed: true
pre-commit:
piped: true
skip:
- merge
- rebase
commands:
prettier:
priority: 1
glob: "*.{ts,mts,cts,js,mjs,cjs,json,md,css,yaml,yml}"
run: npx prettier --cache --write --ignore-unknown {staged_files}
stage_fixed: true
fail_text: "Prettier failed. Run: npm run prettier-fix"
markdownlint:
priority: 2
glob: "*.md"
run: npx markdownlint-cli2 --fix {staged_files}
stage_fixed: true
fail_text: "Markdown lint failed. Run: npm run lint:md:fix"
eslint:
priority: 3
glob: "*.{ts,mts,cts,js,mjs,cjs}"
run: npx eslint --fix --cache --no-warn-ignored {staged_files}
stage_fixed: true
fail_text: "ESLint found unfixable errors. Run: npm run lint-fix"
pre-push:
piped: true
commands:
type-check:
priority: 1
run: npm run type-check
fail_text: "TypeScript type-check failed."
test:
priority: 2
run: npm run test
fail_text: "Tests failed."