Skip to content

Commit f813161

Browse files
authored
⬆️ Upgrade Biome to the latest version (#1861)
1 parent 61174f1 commit f813161

39 files changed

+2024
-2196
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ repos:
2828
hooks:
2929
- id: local-biome-check
3030
name: biome check
31-
entry: npx biome check --write --files-ignore-unknown=true --no-errors-on-unmatched
31+
entry: bash -c 'cd frontend && npm run lint'
3232
language: system
3333
types: [text]
34-
files: "\\.(jsx?|tsx?|c(js|ts)|m(js|ts)|d\\.(ts|cts|mts)|jsonc?|css|svelte|vue|astro|graphql|gql)$"
34+
files: ^frontend/
3535

3636
ci:
3737
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

frontend/biome.json

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json",
3-
"organizeImports": {
4-
"enabled": true
5-
},
2+
"$schema": "https://biomejs.dev/schemas/2.2.3/schema.json",
3+
"assist": { "actions": { "source": { "organizeImports": "on" } } },
64
"files": {
7-
"ignore": [
8-
"node_modules",
9-
"src/routeTree.gen.ts",
10-
"playwright.config.ts",
11-
"playwright-report"
5+
"includes": [
6+
"**",
7+
"!**/dist/**/*",
8+
"!**/node_modules/**/*",
9+
"!**/src/routeTree.gen.ts",
10+
"!**/src/client/**/*",
11+
"!**/src/components/ui/**/*",
12+
"!**/playwright-report",
13+
"!**/playwright.config.ts"
1214
]
1315
},
1416
"linter": {
@@ -20,7 +22,10 @@
2022
"noArrayIndexKey": "off"
2123
},
2224
"style": {
23-
"noNonNullAssertion": "off"
25+
"noNonNullAssertion": "off",
26+
"noParameterAssign": "error",
27+
"useSelfClosingElements": "error",
28+
"noUselessElse": "error"
2429
}
2530
}
2631
},

frontend/openapi-ts.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export default defineConfig({
1313
operationId: true,
1414
classNameBuilder: "{{name}}Service",
1515
methodNameBuilder: (operation) => {
16-
// @ts-ignore
16+
// @ts-expect-error
1717
let name: string = operation.name
18-
// @ts-ignore
18+
// @ts-expect-error
1919
const service: string = operation.service
2020

2121
if (service && name.toLowerCase().startsWith(service.toLowerCase())) {
@@ -30,4 +30,4 @@ export default defineConfig({
3030
type: "json",
3131
},
3232
],
33-
})
33+
})

frontend/package-lock.json

Lines changed: 71 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc -p tsconfig.build.json && vite build",
9-
"lint": "biome check --apply-unsafe --no-errors-on-unmatched --files-ignore-unknown=true ./",
9+
"lint": "biome check --write --unsafe --no-errors-on-unmatched --files-ignore-unknown=true ./",
1010
"preview": "vite preview",
1111
"generate-client": "openapi-ts"
1212
},
@@ -26,7 +26,7 @@
2626
"react-icons": "^5.5.0"
2727
},
2828
"devDependencies": {
29-
"@biomejs/biome": "1.9.4",
29+
"@biomejs/biome": "^2.2.3",
3030
"@hey-api/openapi-ts": "0.73.0",
3131
"@playwright/test": "^1.55.0",
3232
"@tanstack/router-devtools": "^1.131.36",
Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
1-
import type { ApiRequestOptions } from "./ApiRequestOptions"
2-
import type { ApiResult } from "./ApiResult"
1+
import type { ApiRequestOptions } from './ApiRequestOptions';
2+
import type { ApiResult } from './ApiResult';
33

44
export class ApiError extends Error {
5-
public readonly url: string
6-
public readonly status: number
7-
public readonly statusText: string
8-
public readonly body: unknown
9-
public readonly request: ApiRequestOptions
5+
public readonly url: string;
6+
public readonly status: number;
7+
public readonly statusText: string;
8+
public readonly body: unknown;
9+
public readonly request: ApiRequestOptions;
1010

11-
constructor(
12-
request: ApiRequestOptions,
13-
response: ApiResult,
14-
message: string,
15-
) {
16-
super(message)
11+
constructor(request: ApiRequestOptions, response: ApiResult, message: string) {
12+
super(message);
1713

18-
this.name = "ApiError"
19-
this.url = response.url
20-
this.status = response.status
21-
this.statusText = response.statusText
22-
this.body = response.body
23-
this.request = request
24-
}
25-
}
14+
this.name = 'ApiError';
15+
this.url = response.url;
16+
this.status = response.status;
17+
this.statusText = response.statusText;
18+
this.body = response.body;
19+
this.request = request;
20+
}
21+
}

0 commit comments

Comments
 (0)