chore: replace oxlint with biome for linting
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||
"plugins": ["typescript", "oxc"],
|
||||
"categories": {
|
||||
"correctness": "error",
|
||||
"suspicious": "warn"
|
||||
},
|
||||
"ignorePatterns": ["src/generated"]
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user