-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathlefthook.yml
45 lines (42 loc) · 1.58 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
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
skip_output:
- meta # Skips lefthook version printing
- summary # Skips summary block (successful and failed steps) printing
- empty_summary # Skips summary heading when there are no steps to run
- execution_info # Skips printing `EXECUTE > ...` logging
- skips # Skips "skip" printing (i.e. no files matched)
pre-commit:
parallel: true
commands:
format:
glob: "*.{js,ts,jsx,tsx,json},package.json"
exclude: '(^|/)(tests|stories)\.(ts|tsx)$'
run: pnpm exec biome format {all_files} --write
check:
glob: "*.{js,ts,jsx,tsx,json},package.json"
exclude: '(^|/)(tests|stories)\.(ts|tsx)$'
run: pnpm exec biome check {staged_files} --write
lint:
files: git diff --name-only main
glob: "*.{js,ts,jsx,tsx,json},package.json"
exclude: '(^|/)(tests|stories)\.(ts|tsx)$'
run: pnpm exec biome lint {staged_files} --write
typecheck:
files: git diff --name-only main
glob: "*.{js,ts,jsx,tsx,json},package.json"
exclude: '(^|/)(tests|stories)\.(ts|tsx)$'
run: pnpm exec tsc -b
test-unit:
glob: "*.{js,ts,jsx,tsx,json},package.json"
exclude: '(^|/)(tests|stories)\.(ts|tsx)$'
run: pnpm run test
test-coverage:
glob: "*.{js,ts,jsx,tsx,json},package.json"
exclude: '(^|/)(tests|stories)\.(ts|tsx)$'
run: pnpm run test:coverage
pre-push:
commands:
npm-audit:
tags: frontend security
run: pnpm audit --prod