diff --git a/.gitignore b/.gitignore index 36854cc..55de43e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /.vs +/.vscode +.env \ No newline at end of file diff --git a/client/.gitignore b/client/.gitignore index 4d29575..0050a08 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -1,4 +1,22 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. +# logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? # dependencies /node_modules @@ -17,7 +35,7 @@ .env.development.local .env.test.local .env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* +*.local +dist +dist-ssr +*.env \ No newline at end of file diff --git a/client/README.md b/client/README.md new file mode 100644 index 0000000..fd3b758 --- /dev/null +++ b/client/README.md @@ -0,0 +1,12 @@ +# React + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend using TypeScript and enable type-aware lint rules. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project. diff --git a/client/eslint.config.js b/client/eslint.config.js new file mode 100644 index 0000000..ec2b712 --- /dev/null +++ b/client/eslint.config.js @@ -0,0 +1,33 @@ +import js from '@eslint/js' +import globals from 'globals' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' + +export default [ + { ignores: ['dist'] }, + { + files: ['**/*.{js,jsx}'], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + parserOptions: { + ecmaVersion: 'latest', + ecmaFeatures: { jsx: true }, + sourceType: 'module', + }, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...js.configs.recommended.rules, + ...reactHooks.configs.recommended.rules, + 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, + }, +] diff --git a/client/public/index.html b/client/index.html similarity index 89% rename from client/public/index.html rename to client/index.html index f46c07a..33c266b 100644 --- a/client/public/index.html +++ b/client/index.html @@ -12,6 +12,7 @@
+