From d38b75fb667742a759aaa09e23f6f1892f2b83af Mon Sep 17 00:00:00 2001 From: d0zingcat Date: Wed, 14 Jan 2026 20:21:22 +0800 Subject: [PATCH] feat: add lint Signed-off-by: d0zingcat --- apps/server/scripts/create_request.ts | 3 -- apps/server/src/webhook.ts | 6 +-- apps/web/src/App.tsx | 5 ++ .../web/src/components/GroupBindingsModal.tsx | 31 +++++------ apps/web/src/components/Modal.tsx | 10 ++-- apps/web/src/lib/client.ts | 1 + apps/web/src/main.tsx | 17 +++--- apps/web/src/views/AdminView.tsx | 21 +++++--- apps/web/src/views/AuthCallback.tsx | 5 +- apps/web/src/views/SystemLoadView.tsx | 8 +-- apps/web/src/views/TopicsView.tsx | 53 +++++++++++++------ apps/web/src/views/UsersView.tsx | 28 +++++++--- apps/web/vite.config.ts | 2 +- biome.json | 45 ++++++++++------ 14 files changed, 151 insertions(+), 84 deletions(-) diff --git a/apps/server/scripts/create_request.ts b/apps/server/scripts/create_request.ts index 5b0ee6e..d0e3c5d 100644 --- a/apps/server/scripts/create_request.ts +++ b/apps/server/scripts/create_request.ts @@ -1,6 +1,3 @@ -// Simulate topic creation -import { client } from "./client"; // This won't work in node script easily due to frontend dependencies - // Let's use fetch directly against the server async function run() { console.log("Creating pending topic..."); diff --git a/apps/server/src/webhook.ts b/apps/server/src/webhook.ts index 026490b..375cd89 100644 --- a/apps/server/src/webhook.ts +++ b/apps/server/src/webhook.ts @@ -21,7 +21,7 @@ webhook.post("/:token/topic/:slug", async (c) => { logger.warn({ token }, "[Webhook] Invalid personal token"); return c.json({ error: "Invalid personal token" }, 401); } - let body; + let body: any; try { const rawBody = await c.req.text(); logger.debug({ bodyLength: rawBody.length }, "[Webhook] Received raw body"); @@ -248,14 +248,14 @@ webhook.post("/:token/dm", async (c) => { return c.json({ error: "User has no Feishu ID linked" }, 400); } - let body; + let body: any; try { const rawBody = await c.req.text(); if (!rawBody || rawBody.trim() === "") { return c.json({ error: "Empty body" }, 400); } body = JSON.parse(rawBody); - } catch (e) { + } catch (_e) { return c.json({ error: "Invalid JSON body" }, 400); } diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index 73c0b2b..7d93f92 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -46,6 +46,7 @@ function App() { Please sign in with Feishu to continue

)} {user.isAdmin && ( )}