chore: configure root eslint with react and tanstack router rules
This commit is contained in:
parent
88ad6ff276
commit
2025cc7298
22 changed files with 664 additions and 485 deletions
|
|
@ -2,6 +2,9 @@ import eslint from "@eslint/js";
|
|||
import { defineConfig, globalIgnores } from "eslint/config";
|
||||
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
||||
import tseslint from "typescript-eslint";
|
||||
import reactHooks from "eslint-plugin-react-hooks";
|
||||
import reactRefresh from "eslint-plugin-react-refresh";
|
||||
import pluginRouter from "@tanstack/eslint-plugin-router";
|
||||
|
||||
export default defineConfig([
|
||||
globalIgnores([
|
||||
|
|
@ -9,7 +12,7 @@ export default defineConfig([
|
|||
"node_modules/",
|
||||
"eslint.config.mjs",
|
||||
"**/*.config.ts",
|
||||
"apps/web/**",
|
||||
"routeTree.gen.ts",
|
||||
]),
|
||||
|
||||
eslint.configs.recommended,
|
||||
|
|
@ -24,4 +27,17 @@ export default defineConfig([
|
|||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
files: ["apps/web/**/*.{ts,tsx}"],
|
||||
extends: [
|
||||
...pluginRouter.configs["flat/recommended"],
|
||||
reactHooks.configs.flat.recommended,
|
||||
reactRefresh.configs.vite,
|
||||
],
|
||||
},
|
||||
{
|
||||
files: ["apps/web/src/routes/**/*.{ts,tsx}"],
|
||||
rules: { "react-refresh/only-export-components": "off" },
|
||||
},
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue