chore: add gofmt to stage hook

This commit is contained in:
Elias Schneider
2026-10-10 19:00:05 +02:00
parent b0b09ce6cd
commit 54f28f86d0
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -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",
+2 -1
View File
@@ -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/**'],