Skip to content

Commit 9e2594b

Browse files
chore: add lefthook to manage git pre-commit and pre-push hooks (#713)
1 parent db9bec5 commit 9e2594b

File tree

3 files changed

+122
-3
lines changed

3 files changed

+122
-3
lines changed

lefthook.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# EXAMPLE USAGE:
2+
#
3+
# Refer for explanation to following link:
4+
# https://lefthook.dev/configuration/
5+
#
6+
pre-push:
7+
jobs:
8+
- run: pnpm run -r type-check
9+
10+
pre-commit:
11+
parallel: true
12+
commands:
13+
lint:
14+
run: pnpm run -r lint --fix
15+
stage_fixed: true
16+
format:
17+
run: pnpm run format:write
18+
stage_fixed: true

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@vitejs/plugin-react": "4.3.3",
1717
"@vitest/coverage-v8": "^2.1.3",
1818
"@vitest/ui": "2.1.3",
19+
"lefthook": "^1.11.0",
1920
"prettier": "^3.3.3",
2021
"prettier-plugin-tailwindcss": "^0.6.8",
2122
"react-refresh": "^0.14.2",

pnpm-lock.yaml

+103-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)