From 453eaed4dc326909af1bb77e46945de56e611f20 Mon Sep 17 00:00:00 2001 From: quotentiroler Date: Mon, 9 Feb 2026 18:59:42 -0800 Subject: [PATCH] improve pre-commit hook --- git-hooks/pre-commit | 4 ++-- src/channels/plugins/onboarding/whatsapp.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit index 85ce7cd602..0f90530117 100755 --- a/git-hooks/pre-commit +++ b/git-hooks/pre-commit @@ -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 diff --git a/src/channels/plugins/onboarding/whatsapp.ts b/src/channels/plugins/onboarding/whatsapp.ts index 544f97b93a..9629c8973d 100644 --- a/src/channels/plugins/onboarding/whatsapp.ts +++ b/src/channels/plugins/onboarding/whatsapp.ts @@ -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";