-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
36 lines (36 loc) · 851 Bytes
/
Copy path.eslintrc.cjs
File metadata and controls
36 lines (36 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* ESLint configuration for React + Vite + Vitest */
module.exports = {
root: true,
env: {
browser: true,
node: true,
es2021: true,
},
settings: {
react: { version: 'detect' },
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: { jsx: true },
},
plugins: ['react', 'react-hooks'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
],
rules: {
// using the new JSX transform, React in scope is not required
'react/react-in-jsx-scope': 'off',
// do not use prop-types in this project
'react/prop-types': 'off',
},
overrides: [
{
files: ['tests/**/*.test.{js,jsx}', 'tests/setup.js'],
env: { browser: true, node: true, jest: true },
globals: { vi: 'readonly' },
},
],
};