-
Notifications
You must be signed in to change notification settings - Fork 0
/
lefthook.yml
36 lines (36 loc) · 895 Bytes
/
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
# EXAMPLE USAGE:
#
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
#
# pre-push:
# commands:
# packages-audit:
# tags: frontend security
# run: yarn audit
# gems-audit:
# tags: backend security
# run: bundle audit
pre-commit:
piped: true
follow: true
commands:
staged:
priority: 1
run: echo {staged_files} | tr ' ' '\n'
security:
priority: 2
run: gitleaks protect --staged --no-banner
typescript:
priority: 3
glob: "*.{ts,tsx}"
run: na tsc --noEmit
biome:
priority: 4
glob: "*.{ts,tsx,js,jsx,json,jsonc,css}"
run: na biome check --fix {staged_files} --reporter summary
stage_fixed: true
test:
priority: 5
glob: "*.{ts,tsx,js,jsx}"
run: na vitest related --run {staged_files}