mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
improve pre-commit hook
This commit is contained in:
@@ -3,8 +3,8 @@ FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
|
||||
[ -z "$FILES" ] && exit 0
|
||||
|
||||
# Lint and format staged files
|
||||
echo "$FILES" | xargs pnpm exec oxlint --fix 2>/dev/null || true
|
||||
echo "$FILES" | xargs pnpm exec oxfmt --write 2>/dev/null || true
|
||||
echo "$FILES" | xargs pnpm exec oxlint --fix
|
||||
echo "$FILES" | xargs pnpm exec oxfmt --write
|
||||
echo "$FILES" | xargs git add
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import type { OpenClawConfig } from "../../../config/config.js";
|
||||
import type { DmPolicy } from "../../../config/types.js";
|
||||
|
||||
Reference in New Issue
Block a user