forked from czy0729/Bangumi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
executable file
·54 lines (51 loc) · 1.11 KB
/
.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
49
50
51
52
53
54
/*
* @Author: czy0729
* @Date: 2019-03-13 05:15:36
* @Last Modified by: czy0729
* @Last Modified time: 2024-03-07 16:47:55
*/
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin', 'react-hooks', 'prettier'],
ignorePatterns: [
'/node_modules',
'/components/@/*',
'/src/utils/thirdParty/*',
'babel.config.js',
'jsconfig.json'
],
globals: {
global: true,
rerender: true,
warn: true,
log: true,
JSX: true
},
rules: {
'@typescript-eslint/no-shadow': 0,
'@typescript-eslint/no-unused-vars': [
2,
{
ignoreRestSiblings: true
}
],
'max-len': ['error', 200],
/** 允许相同变量名 */
'no-shadow': 0,
'prefer-const': [
'error',
{
ignoreReadBeforeAssign: true
}
],
'react/no-did-mount-set-state': 0,
'react/no-unstable-nested-components': 0,
eqeqeq: 0,
/** parseInt 允许不填进制 */
radix: 0,
/** 设置最大嵌套深度 */
'max-depth': ['warn', 4],
'react-hooks/exhaustive-deps': 'warn'
}
}