From fdd73c711bf864ce1712a3dddfe770d7bbcba0d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 21 May 2026 18:15:29 +0200 Subject: [PATCH] fix(eslint): expand queryKey-factory rule whitelist to mirror test-guard guardedRoots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v1.4.41 W-PROCESS-DOCS promotion of the test-guard substitute to a real ESLint rule shipped with a whitelist (`charts`, `comparison`, `page.tsx`, `use-auth.ts`) narrower than the companion test-guard's `guardedRoots` (which also covers `app/auth`, `app/notifications`, and `components/settings/about-section.tsx` — the three surfaces W-FRONTEND- FACTORY migrated in the same release). Without the mirror, a bare-literal `queryKey: [ ... ]` regression in any of the three v1.4.41-migrated dirs would slip past IDE / `pnpm lint` and only be caught by `pnpm test`. The lint rule and the test-guard should fail at the same boundary. Extends GUARDED_DIRECTORIES + GUARDED_FILES to match the test-guard list, with an inline comment cross-referencing the migration wave. --- eslint-plugins/healthlog/queryKey-factory.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eslint-plugins/healthlog/queryKey-factory.js b/eslint-plugins/healthlog/queryKey-factory.js index d54e6f033..7caffd1ec 100644 --- a/eslint-plugins/healthlog/queryKey-factory.js +++ b/eslint-plugins/healthlog/queryKey-factory.js @@ -48,12 +48,19 @@ const FACTORY_HOME_FILES = [ const GUARDED_DIRECTORIES = [ "src/components/charts", "src/components/comparison", + // v1.4.41 W-FRONTEND-FACTORY — auth + notifications migrated to the + // factory. Mirror the test-guard's guardedRoots so IDE/lint CI fail + // at the same boundary the unit-test walker does. + "src/app/auth", + "src/app/notifications", ]; // Individual guarded files outside the directories above. const GUARDED_FILES = [ "src/app/page.tsx", "src/hooks/use-auth.ts", + // v1.4.41 W-FRONTEND-FACTORY — about-section migrated. + "src/components/settings/about-section.tsx", ]; function isGuarded(filename) {