chore: update lefthook hooks for oxlint and oxfmt

This commit is contained in:
2026-05-28 11:25:02 +02:00
parent 28dc915a8d
commit a9b20dff4c

View File

@@ -1,17 +1,18 @@
{ {
'$schema': 'https://json.schemastore.org/lefthook.json', "$schema": "https://json.schemastore.org/lefthook.json",
'pre-commit': "pre-commit":
{ {
'commands': "commands":
{ {
'prettier': { 'run': 'bunx prettier . --write' }, "format": { "run": "bunx oxfmt" },
'eslint': { 'run': 'bunx eslint . --fix' }, "lint:ts":
'go-fmt': { 'run': 'go fmt ./...' }, { "run": "bunx oxlint --ignore-path .oxlintignore static --max-warnings 0 --fix" },
'go-lint': { 'run': 'bun run lint:go' }, "go-fmt": { "run": "go fmt ./..." },
'go-test': { 'run': 'go test ./...' }, "go-lint": { "run": "bun run lint:go" },
'ts-typecheck': { 'run': 'bunx tsc -p tsconfig.json --noEmit' }, "go-test": { "run": "go test ./..." },
'build-assets': { 'run': 'bun run build:assets' }, "ts-typecheck": { "run": "bunx tsc -p tsconfig.json --noEmit" },
'go-build': { 'run': 'go build -o server ./cmd/server' }, "build-assets": { "run": "bun run build:assets" },
"go-build": { "run": "go build -o server ./cmd/server" },
}, },
}, },
} }