generated from ianzone/react-storybook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlefthook.yml
43 lines (40 loc) · 1.16 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
# yaml-language-server:$schema=./node_modules/lefthook/schema.json
# https://evilmartians.github.io/lefthook/configuration/
pre-commit:
piped: true
jobs:
- name: Linting & Formatting
glob: "*.{ts,tsx,js,jsx,json,jsonc,css}"
run: na biome check --fix {staged_files} --reporter summary
stage_fixed: true
- name: QA, Audit, Misc
group:
parallel: true
jobs:
# SECTION - QA
- name: typescript
glob: "*.{ts,tsx}"
run: na tsc
- name: vitest
glob: "*.{ts,tsx,js,jsx}"
run: na vitest related --run {staged_files}
- name: storybook
glob: "*.{tsx,jsx}"
run: echo 'use storybook'
# SECTION - Audit
- name: gitleaks
run: gitleaks protect --staged --no-banner
- name: audit
run: echo audit
- name: license
run: echo license
#SECTION - Misc
- name: knip
run: na knip --no-exit-code --no-config-hints
prepare-commit-msg:
commands:
commit:
interactive: true
run: na git-cz --hook
env:
LEFTHOOK: "0"