Skip to content

Commit a93bb8c

Browse files
authored
chore: update to Biome v2 (commaai#611)
1 parent 23d2f87 commit a93bb8c

File tree

13 files changed

+65
-54
lines changed

13 files changed

+65
-54
lines changed

biome.jsonc

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,45 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.2.3/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",
66
"useIgnoreFile": true
77
},
88
"files": {
99
"ignoreUnknown": false,
10-
"ignore": []
10+
"includes": ["**"]
1111
},
1212
"formatter": {
1313
"enabled": true,
1414
"formatWithErrors": true,
1515
"indentStyle": "space",
16+
"lineWidth": 140,
1617
"useEditorconfig": true
1718
},
18-
"organizeImports": {
19-
"enabled": false
20-
},
19+
"assist": { "actions": { "source": { "organizeImports": "off" } } },
2120
"linter": {
2221
"enabled": true,
2322
"rules": {
2423
"recommended": true,
25-
"a11y": {
26-
"all": false
27-
},
24+
"a11y": "off",
2825
"complexity": {
2926
"noForEach": "off"
3027
},
3128
"correctness": {
3229
"noUnusedImports": "error",
33-
"noUnusedVariables": "error",
34-
// SolidJS does not require JSX key in iterables
35-
"useJsxKeyInIterable": "off"
30+
"noUnusedVariables": "error"
3631
},
3732
"performance": {
3833
"noBarrelFile": "error"
3934
},
40-
"style": {
41-
"all": false
42-
},
35+
"style": "off",
4336
"suspicious": {
44-
// SolidJS does not use React-style prop names
45-
"noReactSpecificProps": "error"
37+
// Tailwind makes use of custom at-rules
38+
"noUnknownAtRules": "off"
4639
}
40+
},
41+
"domains": {
42+
"solid": "recommended"
4743
}
4844
},
4945
"javascript": {

bun.lock

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

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"packageManager": "bun@1.2.9",
2323
"type": "module",
2424
"//devDependencies": {
25+
"@biomejs/biome": "code formatter and linter",
2526
"@solidjs/testing-library": "test solid components (only used for App.jsx component)",
2627
"@types/mapbox__polyline": "types for mapbox elements",
2728
"@vite-pwa/assets-generator": "generate PWA assets during build",
@@ -41,7 +42,7 @@
4142
"wrangler": "used for deploying assets to cloudflare"
4243
},
4344
"devDependencies": {
44-
"@biomejs/biome": "1.9.4",
45+
"@biomejs/biome": "2.2.3",
4546
"@solidjs/testing-library": "^0.8.10",
4647
"@tanstack/solid-query-devtools": "^5.72.2",
4748
"@types/bun": "^1.2.9",
@@ -91,5 +92,11 @@
9192
"engines": {
9293
"node": ">=20.11.0"
9394
},
94-
"trustedDependencies": ["@biomejs/biome", "@sentry/cli", "esbuild", "lefthook", "workerd"]
95+
"trustedDependencies": [
96+
"@biomejs/biome",
97+
"@sentry/cli",
98+
"esbuild",
99+
"lefthook",
100+
"workerd"
101+
]
95102
}

src/api/athena.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AthenaCallResponse, BackendAthenaCallResponse, BackendAthenaCallResponseError } from '~/api/types'
1+
import type { AthenaCallResponse, BackendAthenaCallResponse, BackendAthenaCallResponseError } from '~/api/types'
22
import { fetcher } from '.'
33
import { ATHENA_URL } from './config'
44

src/api/file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {
1+
import type {
22
CancelUploadRequest,
33
CancelUploadResponse,
44
Files,

src/components/RouteStaticMap.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { createResource, Match, Switch } from 'solid-js'
22
import type { JSXElement, VoidComponent } from 'solid-js'
33
import clsx from 'clsx'
44

5-
import { GPSPathPoint, getCoords } from '~/api/derived'
6-
import { Coords, getPathStaticMapUrl } from '~/map'
5+
import { type GPSPathPoint, getCoords } from '~/api/derived'
6+
import { type Coords, getPathStaticMapUrl } from '~/map'
77
import { getThemeId } from '~/theme'
88
import type { Route } from '~/api/types'
99

@@ -33,11 +33,7 @@ const getStaticMapUrl = (gpsPoints: GPSPathPoint[]): string | undefined => {
3333
return getPathStaticMapUrl(themeId, path, 512, 512, true)
3434
}
3535

36-
const State = (props: {
37-
children: JSXElement
38-
trailing?: JSXElement
39-
opaque?: boolean
40-
}) => {
36+
const State = (props: { children: JSXElement; trailing?: JSXElement; opaque?: boolean }) => {
4137
return (
4238
<div class={clsx('absolute flex size-full items-center justify-center gap-2', props.opaque && 'bg-surface text-on-surface')}>
4339
<span class="text-xs">{props.children}</span>

src/components/StatisticBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import clsx from 'clsx'
2-
import { For, Suspense, VoidComponent } from 'solid-js'
2+
import { For, Suspense, type VoidComponent } from 'solid-js'
33

44
const StatisticBar: VoidComponent<{ class?: string; statistics: { label: string; value: () => unknown }[] }> = (props) => {
55
return (

src/components/UploadQueue.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { createEffect, createMemo, For, Match, Show, Switch, VoidComponent } from 'solid-js'
1+
import { createEffect, createMemo, For, Match, Show, Switch, type VoidComponent } from 'solid-js'
22
import { queryOptions, useMutation, useQuery, useQueryClient } from '@tanstack/solid-query'
33
import { createStore, reconcile } from 'solid-js/store'
44
import LinearProgress from './material/LinearProgress'
5-
import Icon, { IconName } from './material/Icon'
5+
import Icon, { type IconName } from './material/Icon'
66
import IconButton from './material/IconButton'
77
import StatisticBar from './StatisticBar'
88
import Button from '~/components/material/Button'
9-
import { AthenaOfflineQueueResponse, UploadFilesToUrlsRequest, UploadQueueItem } from '~/api/types'
9+
import type { AthenaOfflineQueueResponse, UploadFilesToUrlsRequest, UploadQueueItem } from '~/api/types'
1010
import { cancelUpload, getUploadQueue } from '~/api/file'
1111
import { getAthenaOfflineQueue } from '~/api/devices'
1212

src/components/material/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { JSXElement, ParentComponent } from 'solid-js'
22
import { Show, splitProps } from 'solid-js'
33
import clsx from 'clsx'
44

5-
import ButtonBase, { ButtonBaseProps } from './ButtonBase'
5+
import ButtonBase, { type ButtonBaseProps } from './ButtonBase'
66
import Icon from './Icon'
77

88
type ButtonProps = ButtonBaseProps & {

src/components/material/Icon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type VoidComponent } from 'solid-js'
1+
import type { VoidComponent } from 'solid-js'
22
import clsx from 'clsx'
33

44
// Specify icon names to load only the necessary icons, reducing font payload.

0 commit comments

Comments
 (0)