feat: add prettier and eslint with pre-commit hook

This commit is contained in:
2026-05-10 19:23:53 +02:00
parent be9fbe0f64
commit 3703bbfcfe
33 changed files with 1643 additions and 1245 deletions

View File

@@ -1,13 +1,23 @@
{
"$schema": "https://json.schemastore.org/lefthook.json",
"pre-push": {
"commands": {
"go-fmt": { "run": "go fmt ./..." },
"go-vet": { "run": "go vet ./..." },
"go-test": { "run": "go test ./..." },
"ts-typecheck": { "run": "bunx tsc -p tsconfig.json --noEmit" },
"build-assets": { "run": "bun run build:assets" },
"go-build": { "run": "go build -o server ./cmd/server" }
}
}
'$schema': 'https://json.schemastore.org/lefthook.json',
'pre-commit':
{
'commands':
{
'prettier': { 'run': 'bunx prettier . --write' },
'eslint': { 'run': 'bunx eslint . --fix' },
},
},
'pre-push':
{
'commands':
{
'go-fmt': { 'run': 'go fmt ./...' },
'go-vet': { 'run': 'go vet ./...' },
'go-test': { 'run': 'go test ./...' },
'ts-typecheck': { 'run': 'bunx tsc -p tsconfig.json --noEmit' },
'build-assets': { 'run': 'bun run build:assets' },
'go-build': { 'run': 'go build -o server ./cmd/server' },
},
},
}