-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlefthook.yml
31 lines (26 loc) · 906 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
# https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md
skip_output:
- meta
- execution_out
# Lint and auto-fix issues when possible (fixes are staged), before changes are commited
pre-commit:
# Run in sequence to prevent potential(?) race conditions between format and lint
parallel: false
commands:
# `.prettierignore` is applied
format:
run: npx nx format:write --files='{staged_files}'
stage_fixed: true
# `eslint.config.js` and `.eslintignore` are applied
lint:
run: npx nx lint --fix '{staged_files}'
stage_fixed: true
# Validate Renovate config and suggest migrations
renovate:
glob: '.github/renovate.json'
run: npx --yes --package renovate -- renovate-config-validator --strict
# Lint commit message after pre-commit
commit-msg:
commands:
lint-commit-message:
run: pnpm commitlint --edit {1}