-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.cjs
43 lines (42 loc) · 1023 Bytes
/
.eslintrc.cjs
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
37
38
39
40
41
42
43
const path = require('path')
module.exports = {
env: {
browser: true,
es6: true,
node: true,
jest: true,
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended'],
globals: {
globalThis: false,
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@babel/eslint-parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
modules: true,
},
ecmaVersion: 2021,
sourceType: 'module',
babelOptions: {
configFile: path.join(__dirname, './babel.config.cjs'),
},
},
plugins: ['@babel', 'react'],
rules: {
'react/display-name': 0,
'react/prop-types': 0,
'no-prototype-builtins': 0,
'react/jsx-uses-react': 'off',
'no-control-regex': 0,
'react/react-in-jsx-scope': 'off',
'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: true }],
},
settings: {
react: {
version: require('./package.json').dependencies.react,
},
},
}