diff options
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 |