fix: update lefthook commands to include glob patterns and stage fixed files

This commit is contained in:
Justineo
2025-12-31 12:40:05 +08:00
parent f3219df05b
commit 894d268691

View File

@@ -2,8 +2,13 @@ pre-commit:
parallel: true
commands:
typecheck:
glob: "*.{ts,mts,cts,vue}"
run: pnpm typecheck
lint:
run: pnpm lint:fix
glob: "*.{ts,js,mjs,cjs,mts,cts,vue}"
run: pnpm exec eslint --fix {staged_files}
stage_fixed: true
format:
run: pnpm format
glob: "*.{ts,js,mjs,cjs,cts,mts,json,md,yml,yaml,vue}"
run: pnpm exec oxfmt {staged_files}
stage_fixed: true