From 54f28f86d09dfbd8dc10702c893ac38a91f79a4f Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Sat, 10 Oct 2026 19:00:05 +0200 Subject: [PATCH] chore: add gofmt to stage hook --- package.json | 1 + vite.config.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f797c33b..d9e6ead2 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ ], "scripts": { "preinstall": "npx only-allow pnpm", + "prepare": "vp config --no-agent", "dev": "vp -C frontend run dev", "build": "vp -C frontend run build", "test": "vp -C tests run test", diff --git a/vite.config.ts b/vite.config.ts index e0492e6b..f61450d0 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -42,7 +42,8 @@ export default defineConfig({ staged: { 'frontend/**/*': "sh -c 'vp fmt --check frontend'", 'tests/**/*': "sh -c 'vp fmt --check tests'", - 'email-templates/**/*': "sh -c 'vp fmt --check email-templates'" + 'email-templates/**/*': "sh -c 'vp fmt --check email-templates'", + 'backend/**/*.go': `sh -c 'command -v gofmt >/dev/null || exit 0; gofmt -d "$@"' gofmt` }, test: { exclude: ['**/node_modules/**', 'tests/**'],