/
.eslintrc
85 lines (85 loc) · 2.16 KB
/
.eslintrc
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
"extends": [
"airbnb-base/legacy",
"prettier",
"plugin:jest/recommended",
"plugin:react/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
"env": {
"es6": true,
"node": true,
"browser": true,
"jest": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["prettier", "@typescript-eslint", "import"],
"settings": {
"jest": {
"version": 26
},
"react": {
"version": "detect"
}
},
"rules": {
"prettier/prettier": 1,
"no-restricted-syntax": 0,
"semi": 0,
"no-console": 0,
"no-multi-spaces": 0,
"consistent-return": 0,
"import/no-extraneous-dependencies": 0,
"import/prefer-default-export": 0,
"no-underscore-dangle": [
2,
{
"allowAfterThis": true
}
],
"no-plusplus": [
1,
{
"allowForLoopAfterthoughts": true
}
],
"class-methods-use-this": 0, // 不强制使用 this, 因为子类可能复写方法
"no-param-reassign": 0, // 允许参数更改值
"@typescript-eslint/no-empty-function": 0, // 允许空方法,(默认实现)
"@typescript-eslint/explicit-module-boundary-types": 0, // 允许无返回 值
"import/no-named-default": 0,
"react/jsx-filename-extension": [
1,
{
"extensions": [
".ts",
".tsx",
".js",
".jsx"
]
}
],
"react/prop-types": 0,
"react/state-in-constructor": 0,
"react/jsx-props-no-spreading": 0,
"react/no-array-index-key": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-noninteractive-element-interactions": 0,
"jsx-a11y/no-static-element-interactions": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"no-use-before-define": 0,
"@typescript-eslint/no-use-before-define": [
2
],
"no-shadow": 0,
"@typescript-eslint/no-shadow": [
1
]
}
}