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"]
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
"./problem-details": "./src/problem-details.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "oxlint",
|
||||
"lint": "biome check .",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run --passWithNoTests"
|
||||
},
|
||||
@@ -17,7 +17,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "~6.0.2",
|
||||
"vitest": "^5.0.4",
|
||||
"oxlint": "^1.81.0"
|
||||
"vitest": "^5.0.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,16 +79,20 @@ export const problems = {
|
||||
conflict: (detail?: string): ProblemDetails =>
|
||||
problem({ type: problemTypes.conflict, title: 'Conflict', status: 409, detail }),
|
||||
|
||||
validation: (
|
||||
errors: FieldErrors,
|
||||
detail = 'The request payload is invalid.',
|
||||
): ProblemDetails =>
|
||||
problem({ type: problemTypes.validation, title: 'Validation Error', status: 422, detail, errors }),
|
||||
validation: (errors: FieldErrors, detail = 'The request payload is invalid.'): ProblemDetails =>
|
||||
problem({
|
||||
type: problemTypes.validation,
|
||||
title: 'Validation Error',
|
||||
status: 422,
|
||||
detail,
|
||||
errors,
|
||||
}),
|
||||
|
||||
internal: (detail = 'An unexpected error happened while processing the request.'): ProblemDetails =>
|
||||
internal: (
|
||||
detail = 'An unexpected error happened while processing the request.',
|
||||
): ProblemDetails =>
|
||||
problem({ type: problemTypes.internal, title: 'Internal Server Error', status: 500, detail }),
|
||||
|
||||
unavailable: (detail = 'The service is temporarily unavailable.'): ProblemDetails =>
|
||||
problem({ type: problemTypes.unavailable, title: 'Service Unavailable', status: 503, detail }),
|
||||
} as const
|
||||
|
||||
|
||||
Reference in New Issue
Block a user