mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
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:
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) {
|
||||
|
||||
Reference in new issue
Block a user