Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ repos:
hooks:
- id: local-biome-check
name: biome check
entry: npx biome check --write --files-ignore-unknown=true --no-errors-on-unmatched
entry: bash -c 'cd frontend && npm run lint'
language: system
types: [text]
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css|svelte|vue|astro|graphql|gql)$"
files: ^frontend/

ci:
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
Expand Down
25 changes: 15 additions & 10 deletions frontend/biome.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json",
"organizeImports": {
"enabled": true
},
"$schema": "https://biomejs.dev/schemas/2.2.3/schema.json",
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"files": {
"ignore": [
"node_modules",
"src/routeTree.gen.ts",
"playwright.config.ts",
"playwright-report"
"includes": [
"**",
"!**/dist/**/*",
"!**/node_modules/**/*",
"!**/src/routeTree.gen.ts",
"!**/src/client/**/*",
"!**/src/components/ui/**/*",
"!**/playwright-report",
"!**/playwright.config.ts"
]
},
"linter": {
Expand All @@ -20,7 +22,10 @@
"noArrayIndexKey": "off"
},
"style": {
"noNonNullAssertion": "off"
"noNonNullAssertion": "off",
"noParameterAssign": "error",
"useSelfClosingElements": "error",
"noUselessElse": "error"
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions frontend/openapi-ts.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export default defineConfig({
operationId: true,
classNameBuilder: "{{name}}Service",
methodNameBuilder: (operation) => {
// @ts-ignore
// @ts-expect-error
let name: string = operation.name
// @ts-ignore
// @ts-expect-error
const service: string = operation.service

if (service && name.toLowerCase().startsWith(service.toLowerCase())) {
Expand All @@ -30,4 +30,4 @@ export default defineConfig({
type: "json",
},
],
})
})
143 changes: 71 additions & 72 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -p tsconfig.build.json && vite build",
"lint": "biome check --apply-unsafe --no-errors-on-unmatched --files-ignore-unknown=true ./",
"lint": "biome check --write --unsafe --no-errors-on-unmatched --files-ignore-unknown=true ./",
"preview": "vite preview",
"generate-client": "openapi-ts"
},
Expand All @@ -26,7 +26,7 @@
"react-icons": "^5.5.0"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@biomejs/biome": "^2.2.3",
"@hey-api/openapi-ts": "0.73.0",
"@playwright/test": "^1.55.0",
"@tanstack/router-devtools": "^1.131.36",
Expand Down
38 changes: 17 additions & 21 deletions frontend/src/client/core/ApiError.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
import type { ApiRequestOptions } from "./ApiRequestOptions"
import type { ApiResult } from "./ApiResult"
import type { ApiRequestOptions } from './ApiRequestOptions';
import type { ApiResult } from './ApiResult';

export class ApiError extends Error {
public readonly url: string
public readonly status: number
public readonly statusText: string
public readonly body: unknown
public readonly request: ApiRequestOptions
public readonly url: string;
public readonly status: number;
public readonly statusText: string;
public readonly body: unknown;
public readonly request: ApiRequestOptions;

constructor(
request: ApiRequestOptions,
response: ApiResult,
message: string,
) {
super(message)
constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
super(message);

this.name = "ApiError"
this.url = response.url
this.status = response.status
this.statusText = response.statusText
this.body = response.body
this.request = request
}
}
this.name = 'ApiError';
this.url = response.url;
this.status = response.status;
this.statusText = response.statusText;
this.body = response.body;
this.request = request;
}
}
Loading