Skip to content

Commit 5fbc1b6

Browse files
committed
update biome
1 parent f79cf52 commit 5fbc1b6

File tree

9 files changed

+72
-47
lines changed

9 files changed

+72
-47
lines changed

.github/workflows/actions.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
- "**.md"
1111
jobs:
1212
build:
13+
permissions:
14+
pull-requests: write
1315
runs-on: ubuntu-latest
1416
steps:
1517
# checkout repo

.gitignore

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/target
2-
31
# Logs
42
logs
53
*.log
@@ -24,3 +22,11 @@ dist-ssr
2422
*.njsproj
2523
*.sln
2624
*.sw?
25+
26+
/lib/sqlsync-worker/sqlsync-wasm/pkg
27+
/demo/cloudflare-backend/build
28+
/demo/cloudflare-backend/dist
29+
/lib/sqlsync-worker/dist
30+
/lib/sqlsync-react/dist
31+
/llvm
32+
/target

biome.json

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.4.0/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/1.5.0/schema.json",
33
"organizeImports": {
44
"enabled": false
55
},
66
"vcs": {
77
"enabled": true,
88
"clientKind": "git",
9-
"useIgnoreFile": true
9+
"useIgnoreFile": true,
10+
"defaultBranch": "main"
1011
},
1112
"linter": {
1213
"enabled": true,
@@ -27,18 +28,12 @@
2728
"json": {
2829
"parser": {
2930
"allowComments": true
31+
},
32+
"formatter": {
33+
"enabled": true,
34+
"indentStyle": "space",
35+
"indentWidth": 2,
36+
"lineWidth": 100
3037
}
31-
},
32-
"files": {
33-
"ignore": [
34-
"lib/sqlsync-worker/sqlsync-wasm",
35-
"lib/sqlsync-worker/dist",
36-
"lib/sqlsync-react/dist",
37-
"demo/cloudflare-backend/build",
38-
"demo/cloudflare-backend/dist",
39-
"demo/frontend/dist",
40-
"target",
41-
"llvm"
42-
]
4338
}
4439
}

demo/frontend/src/components/ConnectionStatus.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Button, rem } from "@mantine/core";
22
import { useConnectionStatus } from "@orbitinghail/sqlsync-react";
33
import { JournalId } from "@orbitinghail/sqlsync-worker";
44
import { IconWifi, IconWifiOff } from "@tabler/icons-react";
5-
import { useCallback } from "react";
5+
import { ReactElement, useCallback } from "react";
66
import { useSetConnectionEnabled } from "../doctype";
77

88
export const ConnectionStatus = ({ docId }: { docId: JournalId }) => {
@@ -21,7 +21,9 @@ export const ConnectionStatus = ({ docId }: { docId: JournalId }) => {
2121
}
2222
}, [status, setConnectionEnabled]);
2323

24-
let color, icon, loading;
24+
let color: string,
25+
icon: ReactElement | undefined,
26+
loading = false;
2527
switch (status) {
2628
case "disabled":
2729
color = "gray";

demo/frontend/src/components/QueryViewer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Alert, Button, Code, Collapse, Paper, Textarea } from "@mantine/core";
33
import { useDisclosure } from "@mantine/hooks";
44
import { JournalId } from "@orbitinghail/sqlsync-worker";
55
import { IconAlertCircle, IconCaretDownFilled, IconCaretRightFilled } from "@tabler/icons-react";
6-
import { useMemo, useState } from "react";
6+
import { ReactElement, useMemo, useState } from "react";
77
import { useQuery } from "../doctype";
88

99
interface Props {
@@ -28,7 +28,7 @@ export const QueryViewerInner = ({ docId }: Props) => {
2828
);
2929
}, [result.rows]);
3030

31-
let output;
31+
let output: ReactElement;
3232
if (result.state === "error") {
3333
output = (
3434
<Alert color="red" variant="light" title="SQL Error" icon={<IconAlertCircle />} p="sm">

examples/guestbook-react/src/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function App() {
5959
setMsg("");
6060
}
6161
},
62-
[mutate, msg, setMsg],
62+
[mutate, msg],
6363
);
6464

6565
// create a callback to delete a message

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ default:
66
lint:
77
cargo clippy --all-targets --all-features -- -D warnings
88
cargo fmt --check
9-
pnpm exec biome check .
9+
pnpm exec biome ci --diagnostic-level=warn .
1010

1111
unit-test:
1212
cargo test

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"devDependencies": {
3-
"@biomejs/biome": "1.4.1"
3+
"@biomejs/biome": "1.5.0"
44
}
55
}

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)