From 812a8f287ed66c9965c269bd9a68ba706725556d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 21 May 2026 18:15:59 +0200 Subject: [PATCH] chore(lint): ignore .claude/** worktrees and align check-user mock with RateLimitResult Two small follow-ups to the v1.4.41 inline-QA reconcile: - eslint.config.mjs gains `.claude/**` in the globalIgnores list so a mid-marathon Claude Code worktree on an older base commit can no longer poison `pnpm lint` locally with pre-fix warnings. CI never walks that path; the change is purely for the dev environment. - The check-user route test mock objects for `checkRateLimit` carried a stray `limit: 30` field that does not exist on `RateLimitResult` (the real type is `{ allowed, remaining, resetAt }`). The literal was harmless at runtime but flagged by `tsc --noEmit` on the test-file declarations. Drops the field at all three mock sites. --- eslint.config.mjs | 4 ++++ src/__tests__/api/auth/check-user/route.test.ts | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index b08e653fd..37d18ab88 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -13,6 +13,10 @@ const eslintConfig = defineConfig([ "out/**", "build/**", "next-env.d.ts", + // v1.4.41 — ignore Claude Code session worktrees so a mid-marathon + // worktree on an older commit can't poison `pnpm lint` locally. + // CI never sees this path; the rule is for the dev environment. + ".claude/**", ]), // v1.4.41 W-PROCESS-DOCS — custom rule that flags any bare-array // `queryKey: [ … ]` / `mutationKey: [ … ]` declaration inside the diff --git a/src/__tests__/api/auth/check-user/route.test.ts b/src/__tests__/api/auth/check-user/route.test.ts index 628fc95ab..b82c03cd9 100644 --- a/src/__tests__/api/auth/check-user/route.test.ts +++ b/src/__tests__/api/auth/check-user/route.test.ts @@ -27,7 +27,6 @@ vi.mock("@/lib/logging/transports", () => ({ emitIfSampled: vi.fn() })); vi.mock("@/lib/rate-limit", () => ({ checkRateLimit: vi.fn().mockResolvedValue({ allowed: true, - limit: 30, remaining: 29, resetAt: Date.now() + 15 * 60 * 1000, }), @@ -67,7 +66,6 @@ beforeEach(() => { vi.resetAllMocks(); vi.mocked(checkRateLimit).mockResolvedValue({ allowed: true, - limit: 30, remaining: 29, resetAt: Date.now() + 15 * 60 * 1000, }); @@ -153,7 +151,6 @@ describe("POST /api/auth/check-user", () => { it("returns 429 when the per-IP rate-limit is exhausted", async () => { vi.mocked(checkRateLimit).mockResolvedValueOnce({ allowed: false, - limit: 30, remaining: 0, resetAt: Date.now() + 15 * 60 * 1000, });