diff options
author | Pawel Zelawski <pawel.zelawski@outlook.com> | 2025-04-10 10:46:15 +0200 |
---|---|---|
committer | Pawel Zelawski <pawel.zelawski@outlook.com> | 2025-04-10 10:46:15 +0200 |
commit | ef435a15ca67c829ce6cd8551ac45c419cb9792e (patch) | |
tree | d8c1cbe036370d6952a306f0fea0a7de3522ae31 /.eslintrc.cjs | |
parent | b290aec2899208169b5f90c9e2b66ebffd565a87 (diff) |
feat: setup project structure and tooling
- Initialized npm project and added core dependencies (React, Express, etc.).
- Added development dependencies (TypeScript, Vite, ESLint, Prettier, etc.).
- Configured TypeScript (`tsconfig.json`).
- Configured Vite (`vite.config.ts`) with React plugin and API proxy.
- Configured ESLint (`.eslintrc.cjs`) and Prettier (`.prettierrc.cjs`, `.prettierignore`).
- Added standard `.gitignore`.
- Created basic project structure (`src/client`, `src/server`, `public`).
- Created default `.env` file (PORT=3001, PUBLIC_URL=http://localhost:3001).
Diffstat (limited to '.eslintrc.cjs')
-rw-r--r-- | .eslintrc.cjs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..e7f58a7 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,35 @@ +module.exports = { + root: true, + env: { browser: true, es2020: true, node: true }, // Add node: true for backend files + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:react-hooks/recommended', + 'prettier', // Uses eslint-config-prettier to disable ESLint rules that would conflict with Prettier + 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. + ], + ignorePatterns: ['dist', '.eslintrc.cjs', 'vite.config.ts', 'node_modules'], + parser: '@typescript-eslint/parser', + plugins: ['react-refresh', '@typescript-eslint', 'prettier'], + rules: { + 'prettier/prettier': 'warn', // Show Prettier issues as warnings + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + '@typescript-eslint/no-unused-vars': [ + 'warn', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], + // Add any project-specific rules here + }, + settings: { + react: { + version: 'detect' // Automatically detect the React version + } + } +};
\ No newline at end of file |