Skip to content

Commit

Permalink
feat: setup tanstack router
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanGrenier committed Feb 28, 2025
1 parent 42d41c4 commit cdcb92f
Show file tree
Hide file tree
Showing 18 changed files with 1,347 additions and 62 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.env

# Logs
logs
*.log
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@

# Contributing

## Environment Variables

All environment variables go in the .env file. Vite will pickup on any variables prefixed with `VITE_`. You can also declare them manually in the `vite.config.ts` file (as well as default values).

| Variable | Default |
| ----------------- | ------- |
| TANSTACK_DEVTOOLS | false |

## Routing

This project uses [TanStack Router](https://tanstack.com/router/latest) for file based routing.

You can use both flat and directory routes in the same project. More info [here](https://tanstack.com/router/latest/docs/framework/react/routing/file-based-routing#mixed-flat-and-directory-routes).

> The full routing docs can be found here: https://tanstack.com/router/latest/docs/framework/react/routing/routing-concepts
## Icon Library

Shadcn recommend using [Lucide Icons](https://lucide.dev/icons/). The package is already installed, just import the icon you want to use.
Expand Down
5 changes: 4 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";
import react from "eslint-plugin-react";
import pluginRouter from "@tanstack/eslint-plugin-router";

export default tseslint.config(
{ ignores: ["dist"] },
{ ignores: ["dist", "**/routeTree.gen.ts"] },
{
extends: [
js.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
...pluginRouter.configs["flat/recommended"],
],
files: ["**/*.{ts,tsx}"],
languageOptions: {
Expand Down Expand Up @@ -38,6 +40,7 @@ export default tseslint.config(
"react-refresh/only-export-components": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@tanstack/router/create-route-property-order": "error",
},
}
);
Loading

0 comments on commit cdcb92f

Please sign in to comment.