Skip to content

Commit 87e5155

Browse files
aster-voidclaude
andcommitted
treewide: fix biome check errors
- Add radix parameter to Number.parseInt calls - Ignore tailwind.css from biome (Tailwind directives not supported) - Replace empty fragments with null - Add biome-ignore comments for document.cookie and a11y - Auto-fix: organize imports, remove unused variables, sort classes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent c6a9a85 commit 87e5155

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+570
-588
lines changed

biome.jsonc

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"files": {
99
"ignoreUnknown": true,
10-
"includes": ["**"]
10+
"includes": ["**", "!**/tailwind.css"]
1111
},
1212
"formatter": {
1313
"enabled": true,
@@ -35,5 +35,17 @@
3535
"formatter": {
3636
"quoteStyle": "double"
3737
}
38-
}
38+
},
39+
"css": {
40+
"parser": {
41+
"cssModules": true
42+
}
43+
},
44+
"overrides": [
45+
{
46+
"includes": ["**/tailwind.css"],
47+
"linter": { "enabled": false },
48+
"formatter": { "enabled": false }
49+
}
50+
]
3951
}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,10 @@
2222
"prisma": "cd server; bun prisma",
2323
"test": "jest"
2424
},
25-
"workspaces": ["common", "web", "server", "scripts/*"]
25+
"workspaces": [
26+
"common",
27+
"web",
28+
"server",
29+
"scripts/*"
30+
]
2631
}

scripts/seed/common.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
import { prisma } from "../../server/config/prisma.ts";
12
import { languages } from "./data/languages.ts";
23
import { universities } from "./data/universities.ts";
34

4-
import { prisma } from "../../server/config/prisma.ts";
5-
65
export async function main() {
76
const firstUniversity = universities[0];
87
if (!firstUniversity) throw new Error("please input universities");

server/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const app = new Hono()
3131
.use(cors())
3232
// TODO(PERF):: delete this in production
3333
.use(async (c, next) => {
34-
const latency = Number.parseInt(env(c, "ARTIFICIAL_NETWORK_LATENCY", { fallback: "0" }));
34+
const latency = Number.parseInt(env(c, "ARTIFICIAL_NETWORK_LATENCY", { fallback: "0" }), 10);
3535
await Bun.sleep(latency);
3636
await next();
3737
})

server/lib/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function env(c: Context, name: string, options?: { fallback?: string }):
77

88
export function env_int(c: Context, name: string, options?: { fallback?: string }): number {
99
const val = env(c, name, options);
10-
const parsed = Number.parseInt(val);
10+
const parsed = Number.parseInt(val, 10);
1111
if (Number.isNaN(parsed)) throw new Error(`[env_int] expected int-parsable value, got ${val}`);
1212
return parsed;
1313
}

server/middlewares/cors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { cors as hono_cors } from "hono/cors";
2-
import { env } from "../lib/env.js";
2+
import { env } from "../lib/env.ts";
33

44
const cors = () =>
55
hono_cors({

server/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,7 @@
2929
"prisma": "^6.19.0",
3030
"typescript": "^5.9.3"
3131
},
32-
"trustedDependencies": ["@prisma/client"]
32+
"trustedDependencies": [
33+
"@prisma/client"
34+
]
3335
}

server/routes/chat.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { zValidator } from "@hono/zod-validator";
22
import { randomUUIDv7 } from "bun";
3+
import { MESSAGE_MAX_LENGTH, type Message } from "common/zod/schema.ts";
34
import { stringify } from "devalue";
45
import { Hono } from "hono";
6+
import { HTTPException } from "hono/http-exception";
57
import { streamSSE } from "hono/streaming";
68
import z from "zod";
7-
import { prisma } from "../config/prisma.ts";
8-
9-
import { MESSAGE_MAX_LENGTH, type Message } from "common/zod/schema.ts";
10-
import { HTTPException } from "hono/http-exception";
119
import { getUserID } from "../auth/func.ts";
10+
import { prisma } from "../config/prisma.ts";
1211
import { onMessageSend } from "../email/hooks/onMessageSend.ts";
12+
1313
const router = new Hono()
1414
// # general paths
1515
// ## about room
@@ -62,7 +62,7 @@ const router = new Hono()
6262
data: c.req.valid("json"),
6363
});
6464
return c.json({ ok: true }, 200);
65-
} catch (err) {
65+
} catch (_err) {
6666
return c.json({ error: "room not found" }, 404);
6767
}
6868
},
@@ -123,7 +123,7 @@ const router = new Hono()
123123
},
124124
});
125125
return c.json({ ok: true }, 200);
126-
} catch (err) {
126+
} catch (_err) {
127127
return c.json({ error: "member not found" }, 404);
128128
}
129129
},
@@ -471,7 +471,7 @@ const router = new Hono()
471471
data: { content: json.content, isEdited: true },
472472
select: { roomId: true },
473473
});
474-
} catch (err) {
474+
} catch (_err) {
475475
return c.json({ error: "previous message not found" }, 404);
476476
}
477477

@@ -516,7 +516,7 @@ const router = new Hono()
516516
where: { id: messageId, senderId: requester, roomId: room },
517517
select: { roomId: true },
518518
});
519-
} catch (err) {
519+
} catch (_err) {
520520
return c.json({ error: "previous message not found" }, 404);
521521
}
522522

web/src/actions/room.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use server";
22

3-
import { deleteRoom as deleteRoomApi } from "@/data/room.server";
43
import { revalidatePath } from "next/cache";
4+
import { deleteRoom as deleteRoomApi } from "@/data/room.server.ts";
55

66
export async function deleteRoom(roomId: string) {
77
try {

web/src/app/[locale]/(auth)/chat/[id]/MessageInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"use client";
22

3-
import { client } from "@/client";
4-
import { useAuthContext } from "@/features/auth/providers/AuthProvider";
53
import clsx from "clsx";
64
import { MESSAGE_MAX_LENGTH } from "common/zod/schema";
75
import { useState } from "react";
86
import { AiOutlineSend } from "react-icons/ai";
7+
import { client } from "@/client.ts";
8+
import { useAuthContext } from "@/features/auth/providers/AuthProvider.tsx";
99

1010
export function MessageInput({ roomId }: { roomId: string }) {
1111
const { idToken: Authorization } = useAuthContext();

0 commit comments

Comments
 (0)