-
-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathlefthook.yml
More file actions
41 lines (33 loc) · 1.06 KB
/
Copy pathlefthook.yml
File metadata and controls
41 lines (33 loc) · 1.06 KB
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
# Lefthook configuration
# See: https://lefthook.dev/configuration/index.html
min_version: 2.1.10
pre-commit:
parallel: true
jobs:
- name: format
run: pnpm exec nx format:write {staged_files}
glob: '*.{js,mjs,jsx,json,css,scss,md,ts,tsx,html,graphql,yml,yaml}'
stage_fixed: true
- name: check-lock-files
run: pnpm run check-lock-files
commit-msg:
jobs:
- name: commitlint
run: pnpm exec commitlint --edit {1}
pre-push:
parallel: true
jobs:
- name: check-format
run: pnpm exec nx format:check {push_files}
glob: '*.{js,mjs,jsx,json,css,scss,md,ts,tsx,html,graphql,yml,yaml}'
- name: check-lock-files
run: pnpm run check-lock-files
post-checkout:
jobs:
- name: notify-lockfile-changes
run: node ./tools/scripts/notify-lockfile-changes.mjs $(git diff-tree -r --name-only --no-commit-id {1} {2})
post-merge:
jobs:
- name: notify-lockfile-changes
files: git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD
run: node ./tools/scripts/notify-lockfile-changes.mjs {files}