-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.lefthook.yml
65 lines (61 loc) · 2.14 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
pre-commit:
parallel: true
commands:
type-check:
glob: '*.{ts,tsx}'
run: npx tsc --noEmit {staged_files}
stylelint:
glob: '*.css'
# glob: '*.{js,ts,jsx,tsx}' # For CSS-in-JS
run: npx stylelint {staged_files}
biome:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}
stage_fixed: true
spelling:
glob: '*.{js,ts,jsx,tsx,md}'
run: npx cspell {staged_files}
markdown-link-check:
glob: '*.md'
run: npx markdown-link-check {staged_files}
gitLeaks:
run: gitleaks detect --source . -v
commit-msg:
parallel: true
commands:
lint-commit-msg:
run: npx commitlint --edit
# TODO: Check the bug ticket: https://github.com/sindresorhus/find-up-simple/issues/2
# spell-check:
# run: npx cspell --locale=en --no-summary --no-progress --show-suggestions --language-id commit-msg {1}
prepare-commit-msg:
commands:
jira-prepare-commit-msg:
run: npx jira-prepare-commit-msg {1}
pre-push:
parallel: true
commands:
test:
run: npm test
audit:
tags: frontend security
run: npm audit
stylelint:
glob: '*.css'
# glob: '*.{js,ts,jsx,tsx}' # For CSS-in-JS
run: npx stylelint {push_files}
biome:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: npx @biomejs/biome check --no-errors-on-unmatched --files-ignore-unknown=true {push_files}
# playwright:
# run: npx playwright test
output:
# - meta # Print lefthook version
# - summary # Print summary block (successful and failed steps)
# - empty_summary # Print summary heading when there are no steps to run
# - success # Print successful steps
- failure # Print failed steps printing
# - execution # Print any execution logs (but prints if the execution failed)
# - execution_out # Print execution output (but still prints failed commands output)
# - execution_info # Print `EXECUTE > ...` logging
# - skips # Print "skip" (i.e. no files matched)