-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
121 lines (121 loc) · 2.25 KB
/
.eslintrc.json
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{
// 默认情况下,ESLint会在所有父级组件中寻找配置文件,一直到根目录。ESLint一旦发现配置文件中有 "root": true,它就会停止在父级目录中寻找
"root": true,
"overrides": [
{
"files": ["webpack.config.js", "index.tsx"],
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
}
],
"parser": "@typescript-eslint/parser",
"globals": {
"var2": "writable"
},
"extends": [
"react-app",
"react-app/jest",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"@typescript-eslint",
"unused-imports"
],
"rules": {
"no-undef": "warn",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"import/no-anonymous-default-export": "off",
"prefer-template": "off",
"no-debugger": 1,
"no-console": [
1,
{
"allow": [
"warn",
"error"
]
}
],
"prefer-const": 1,
// "one-var": [
// 2,
// "never"
// ],
"no-param-reassign": [
0,
{
"props": true
}
],
"no-else-return": [
2,
{
"allowElseIf": false
}
],
"no-unneeded-ternary": [
2,
{
"defaultAssignment": false
}
],
"prefer-arrow-callback": [
1
],
"prefer-destructuring": [
1,
{
"object": true,
"array": false
}
],
"object-shorthand": [
2,
"always",
{
"avoidQuotes": true
}
],
"template-curly-spacing": [
2
],
"space-before-function-paren": 0,
"dot-notation": [
1,
{
"allowKeywords": true
}
],
"@typescript-eslint/array-type": [
2
],
"import/order": [
2,
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always-and-inside-groups"
}
],
"import/first": [
2
],
"import/no-duplicates": [
2
],
"import/newline-after-import": [
2
],
"@typescript-eslint/explicit-module-boundary-types": [
0
],
"unused-imports/no-unused-imports": [
2
]
}
}