Clear lint warnings from the audit branch (deps + extract NotFound)

- CreationWizard: add sys.skills to the loader effect's deps (stable singleton).
- Extract NotFound to src/app/NotFound.tsx so router.tsx no longer trips
  react-refresh/only-export-components.

Branch is now warning-clean (the 3 remaining eslint errors are pre-existing on master,
in files this branch does not touch).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 17:50:27 +02:00
parent 4681119424
commit f7e1c43612
4 changed files with 17 additions and 14 deletions
+12
View File
@@ -0,0 +1,12 @@
import { Link } from '@tanstack/react-router';
/** Shown for any URL outside the app's routes (previously rendered a blank shell). */
export function NotFound() {
return (
<div className="p-10 text-center">
<h1 className="font-display text-2xl font-semibold text-ink">Page not found</h1>
<p className="mt-2 text-muted">That page doesnt exist or has moved.</p>
<Link to="/" className="mt-4 inline-block text-accent hover:underline">Back to campaigns</Link>
</div>
);
}
@@ -134,7 +134,8 @@ export function CreationWizard({ campaign, onClose }: { campaign: Campaign; onCl
void loadPf2e('backgrounds').then((bs) => on && setBackgrounds(dedupeByName(bs.map((b) => ({ name: String(b.name), desc: briefOverview(String((b.description ?? b.text) ?? '')) })))));
}
return () => { on = false; };
}, [system]);
// sys.skills is a stable singleton keyed by `system`, so `system` covers it.
}, [system, sys.skills]);
// ---- selections ----
const [step, setStep] = useState(0);
+2 -12
View File
@@ -1,5 +1,6 @@
import { createRootRoute, createRoute, createRouter, Link } from '@tanstack/react-router';
import { createRootRoute, createRoute, createRouter } from '@tanstack/react-router';
import { RootLayout } from '@/app/RootLayout';
import { NotFound } from '@/app/NotFound';
import { CampaignsPage } from '@/features/campaigns/CampaignsPage';
import { CharactersPage } from '@/features/characters/CharactersPage';
import { CharacterSheetPage } from '@/features/characters/CharacterSheetPage';
@@ -62,17 +63,6 @@ const routeTree = rootRoute.addChildren([
assistantRoute,
]);
/** Shown for any URL outside the routes above (previously rendered a blank shell). */
function NotFound() {
return (
<div className="p-10 text-center">
<h1 className="font-display text-2xl font-semibold text-ink">Page not found</h1>
<p className="mt-2 text-muted">That page doesnt exist or has moved.</p>
<Link to="/" className="mt-4 inline-block text-accent hover:underline">Back to campaigns</Link>
</div>
);
}
export const router = createRouter({ routeTree, defaultPreload: 'intent', defaultNotFoundComponent: NotFound });
declare module '@tanstack/react-router' {