From 4086aac50c427f4b96480e6706456684ca85fd00 Mon Sep 17 00:00:00 2001 From: le king fu Date: Sat, 30 May 2026 14:22:44 -0400 Subject: [PATCH] chore(web): fix prefer-const and remove unused import Three pre-existing lint issues surfaced during #70's lint check: - lists/[id]/page.tsx: subtasksMap was `let`, never reassigned -> const - api/lists/[id]/tasks/route.ts: query was `let`, never reassigned -> const - Header.tsx: drop unused `Link` import from next/link Leaves web/ lint at a single remaining error (ThemeToggle set-state-in-effect), tracked in #90 (needs a design decision: useSyncExternalStore vs documented eslint-disable). Co-Authored-By: Claude Opus 4.8 (1M context) --- web/src/app/(app)/lists/[id]/page.tsx | 2 +- web/src/app/api/lists/[id]/tasks/route.ts | 2 +- web/src/components/Header.tsx | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/web/src/app/(app)/lists/[id]/page.tsx b/web/src/app/(app)/lists/[id]/page.tsx index fa5e9bb..d4e93de 100644 --- a/web/src/app/(app)/lists/[id]/page.tsx +++ b/web/src/app/(app)/lists/[id]/page.tsx @@ -74,7 +74,7 @@ export default async function ListPage({ // Fetch subtasks for all parent tasks const parentIds = tasks.map((t) => t.id); - let subtasksMap: Record = {}; + const subtasksMap: Record = {}; if (parentIds.length > 0) { const allSubtasks = await db diff --git a/web/src/app/api/lists/[id]/tasks/route.ts b/web/src/app/api/lists/[id]/tasks/route.ts index 1e5ee50..af319e4 100644 --- a/web/src/app/api/lists/[id]/tasks/route.ts +++ b/web/src/app/api/lists/[id]/tasks/route.ts @@ -49,7 +49,7 @@ export async function GET( } // Build query - let query = db + const query = db .select() .from(slTasks) .where(and(...conditions)); diff --git a/web/src/components/Header.tsx b/web/src/components/Header.tsx index 31c7f2a..473d1ed 100644 --- a/web/src/components/Header.tsx +++ b/web/src/components/Header.tsx @@ -2,7 +2,6 @@ import { ThemeToggle } from "./ThemeToggle"; import { User, LogOut } from "lucide-react"; -import Link from "next/link"; import { useState } from "react"; import { useTranslation } from "react-i18next";