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

@@ -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"
}
}

View File

@@ -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