chore: replace oxlint with biome for linting

This commit is contained in:
Jose Selesan
2026-10-15 15:30:22 -03:00
parent 2b1d2152c4
commit bd519e7082
43 changed files with 633 additions and 793 deletions

View File

@@ -1,9 +0,0 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "oxc"],
"categories": {
"correctness": "error",
"suspicious": "warn"
},
"ignorePatterns": ["src/generated"]
}

View File

@@ -7,7 +7,7 @@
"dev": "bun run --watch src/index.ts",
"build": "bun build src/index.ts --target bun --outdir dist",
"start": "bun run dist/index.js",
"lint": "oxlint",
"lint": "biome check .",
"typecheck": "tsc --noEmit",
"test": "bun test",
"db:generate": "prisma generate",
@@ -32,7 +32,6 @@
"@types/pg": "^8.23.1",
"dotenv": "^18.0.7",
"prisma": "^7.10.0",
"typescript": "~6.0.2",
"oxlint": "^1.81.0"
"typescript": "~6.0.2"
}
}

View File

@@ -14,7 +14,10 @@ const onInvalid: Hook<unknown, Env, string> = (result, c: Context) => {
for (const issue of (result.error as ZodError).issues) {
const path = issue.path.length > 0 ? issue.path.map(String).join('.') : '_root'
;(fieldErrors[path] ??= []).push(issue.message)
const messages = fieldErrors[path] ?? []
messages.push(issue.message)
fieldErrors[path] = messages
}
return c.body(JSON.stringify(problems.validation(fieldErrors)), 422, {