-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
Copy pathlefthook.yml
41 lines (36 loc) · 1.05 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
# 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,mjs,mts,json,jsonc,css}"
run: pnpm biome check --fix {staged_files} --reporter summary
stage_fixed: true
# - name: QA
# group:
# parallel: true
# jobs:
# - name: typecheck
# glob: "*.{ts,tsx}"
# run: pnpm tsc
# - name: test
# glob: "*.{ts,tsx}"
# run: pnpm run test
prepare-commit-msg:
commands:
commit:
skip:
- run: node -e "require('fs').readFileSync('.git/COMMIT_EDITMSG','utf8').trim()||process.exit(1)"
interactive: true
run: pnpm git-cz --hook
env:
LEFTHOOK: "0"
commit-msg:
commands:
commitlint:
run: pnpm commitlint --edit {1} --config commitlint.config.js
post-merge:
commands:
dependencies:
run: git diff --quiet HEAD@{$(echo 1)} -- pnpm-lock.yaml || pnpm install