fix(eslint): expand queryKey-factory rule whitelist to mirror test-guard guardedRoots

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.
This commit is contained in:
Marc-André Bombeck committed 2026-05-21 18:15:29 +02:00
1 parent 2f52f66879
commit fdd73c711b
1 file changed
+7
@@ -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) {