-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlefthook.yml
38 lines (36 loc) · 2.09 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
commit-msg:
scripts:
"commitlint.sh":
runner: bash
pre-commit:
commands:
1_format_write:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: bunx biome check --formatter-enabled=true --organize-imports-enabled=false --linter-enabled=false --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again
2_import_sort_fix:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: bunx biome check --organize-imports-enabled=true --formatter-enabled=false --linter-enabled=false --fix --unsafe --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again
3_lint_fix:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: bunx biome check --linter-enabled=true --formatter-enabled=false --organize-imports-enabled=false --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again
4_type_check:
glob: "*.{json,js,ts,tsx}"
run: bunx tsc --noEmit -p ./tsconfig.json
pre-push:
commands:
1_format_write:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: bunx biome check --formatter-enabled=true --linter-enabled=false --organize-imports-enabled=true --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again
2_import_sort_fix:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: bunx biome check --formatter-enabled=false --linter-enabled=false --organize-imports-enabled=true --fix --unsafe --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again
3_lint_fix:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run: bunx biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} && git update-index --again
4_type_check:
glob: "*.{json,js,ts,tsx}"
run: bunx tsc --noEmit -p ./tsconfig.json
5_build:
run: bunx next build
6_bundlesize_check:
run: bunx bundlewatch --config bundlewatch.config.json