forked from cossteam/cossim-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
48 lines (48 loc) · 845 Bytes
/
.eslintrc.js
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
44
45
46
47
48
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: ['eslint:recommended', 'plugin:react/recommended'],
ignorePatterns: ['dist', '.eslintrc.js', 'electron'],
overrides: [
{
env: {
node: true
},
files: ['.eslintrc.src/**/*.{js,cjs}'],
parserOptions: {
sourceType: 'module'
}
}
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
plugins: ['react'],
rules: {
// 未使用变量
'no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: true,
caughtErrors: 'all'
}
],
// 禁止使用未定义的 propType
'react/prop-types': 'error',
'no-async-promise-executor': 'off',
'no-extra-semi': 'off',
"eslint/no-var-requires": "off",
"no-undef": [
"error",
{
"typeof": true
}
]
}
}