diff --git a/apps/web/eslint.config.js b/apps/web/eslint.config.js new file mode 100644 index 00000000..c51004b2 --- /dev/null +++ b/apps/web/eslint.config.js @@ -0,0 +1,27 @@ +import pluginReact from 'eslint-plugin-react' +import reactCompiler from 'eslint-plugin-react-compiler' +import globals from 'globals' +import tseslint from 'typescript-eslint' + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + { files: ['**/*.{ts,tsx}'] }, + { languageOptions: { globals: { ...globals.browser, ...globals.node } } }, + tseslint.configs.base, + pluginReact.configs.flat.recommended, + pluginReact.configs.flat['jsx-runtime'], + { + plugins: { + 'react-compiler': reactCompiler, + }, + rules: { + 'react-compiler/react-compiler': 'error', + }, + }, + { + rules: { + 'react/no-unescaped-entities': 'off', + 'react/prop-types': [1, { skipUndeclared: true }], + }, + }, +] diff --git a/apps/web/package.json b/apps/web/package.json index 59dc1ec3..ce5ad600 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -23,10 +23,13 @@ "react": "19.0.0", "react-dom": "19.0.0", "react-router": "7.0.2", - "remix-utils": "8.0.0" + "remix-utils": "8.0.0", + "vite-plugin-babel": "1.3.0" }, "devDependencies": { + "@babel/preset-typescript": "7.26.0", "@codecov/vite-plugin": "1.6.0", + "@eslint/js": "9.16.0", "@react-router/dev": "7.0.2", "@suddenlygiovanni/config-typescript": "workspace:*", "@tailwindcss/typography": "0.5.15", @@ -37,9 +40,15 @@ "@types/react-dom": "19.0.2", "@vitest/coverage-v8": "3.0.0-beta.2", "@vitest/ui": "3.0.0-beta.2", + "babel-plugin-react-compiler": "19.0.0-beta-37ed2a7-20241206", + "eslint": "9.16.0", + "eslint-plugin-react": "7.37.2", + "eslint-plugin-react-compiler": "19.0.0-beta-37ed2a7-20241206", + "globals": "15.13.0", "react-router-devtools": "2.0.0-beta.0", "tailwindcss": "4.0.0-beta.7", "tailwindcss-animate": "1.0.7", + "typescript-eslint": "8.18.0", "vite": "6.0.3", "vite-tsconfig-paths": "5.1.4", "vitest": "3.0.0-beta.2" diff --git a/apps/web/src/root.tsx b/apps/web/src/root.tsx index c13215b3..c8cb2390 100644 --- a/apps/web/src/root.tsx +++ b/apps/web/src/root.tsx @@ -67,21 +67,6 @@ export function loader({ request }: Route.LoaderArgs) { } } -export default function App(_: Route.ComponentProps): ReactElement { - const { requestInfo } = useLoaderData() - const theme = useTheme() - - return ( - <> -
-
- -
-