chore: configure root eslint with react and tanstack router rules

This commit is contained in:
lila 2026-03-21 19:32:38 +01:00
parent 88ad6ff276
commit 2025cc7298
22 changed files with 664 additions and 485 deletions

View file

@ -0,0 +1,20 @@
import { createRootRoute, Link, Outlet } from "@tanstack/react-router";
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
const RootLayout = () => (
<>
<div className="p-2 flex gap-2">
<Link to="/" className="[&.active]:font-bold">
Home
</Link>{" "}
<Link to="/about" className="[&.active]:font-bold">
About
</Link>
</div>
<hr />
<Outlet />
<TanStackRouterDevtools />
</>
);
export const Route = createRootRoute({ component: RootLayout });

View file

@ -0,0 +1,7 @@
import { createFileRoute } from "@tanstack/react-router";
export const Route = createFileRoute("/about")({ component: About });
function About() {
return <div className="p-2">Hello from About!</div>;
}

View file

@ -0,0 +1,11 @@
import { createFileRoute } from "@tanstack/react-router";
export const Route = createFileRoute("/")({ component: Index });
function Index() {
return (
<div className="p-2">
<h3>Welcome Home!</h3>
</div>
);
}