-
Notifications
You must be signed in to change notification settings - Fork 10
/
.eslintrc.json
170 lines (170 loc) · 4.03 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
{
"env": {
"commonjs": true,
"node": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"plugin:prettier/recommended",
"eslint:recommended"
],
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": ["error", "always"],
"arrow-spacing": "error",
"camelcase": "error",
"comma-dangle": ["error", "always-multiline"],
"curly": "error",
"default-case": "error",
"dot-notation": "warn",
"eqeqeq": "error",
"max-len": [
"warn",
{
"code": 180,
"ignoreUrls": true,
"ignoreRegExpLiterals": true
}
],
"newline-per-chained-call": "off",
"no-alert": "warn",
"no-confusing-arrow": "off",
"no-console": "error",
"no-duplicate-imports": [
"error",
{
"includeExports": true
}
],
"no-else-return": "error",
"no-eq-null": "error",
"no-extra-bind": "error",
"no-lone-blocks": "error",
"no-multiple-empty-lines": ["error"],
"no-nested-ternary": ["error"],
"no-param-reassign": "error",
"no-return-assign": "error",
"no-return-await": "warn",
"no-self-compare": "error",
"no-template-curly-in-string": "error",
"no-underscore-dangle": [
"warn",
{
"allowAfterSuper": true,
"enforceInMethodNames": true
}
],
"no-useless-concat": "error",
"no-useless-constructor": "error",
"no-useless-escape": "error",
"no-var": "error",
"prefer-const": "error",
"prefer-promise-reject-errors": "error",
"prefer-template": "error",
"require-await": "warn",
"spaced-comment": "error",
"symbol-description": "error",
// import
"import/newline-after-import": [
"error",
{
"count": 1
}
],
"import/no-dynamic-require": "off",
"import/no-extraneous-dependencies": "off",
"import/no-named-as-default": "off",
// react
"react/boolean-prop-naming": "error",
"react/default-props-match-prop-types": [
"error",
{
"allowRequiredDefaults": true
}
],
"react/forbid-prop-types": "off",
"react/jsx-boolean-value": "error",
"react/jsx-filename-extension": "off",
"react/jsx-handler-names": "error",
"react/jsx-key": "error",
"react/jsx-indent": ["error", 2],
"react/jsx-indent-props": ["error", 2],
"react/jsx-no-bind": "error",
"react/jsx-no-comment-textnodes": "error",
"react/jsx-no-duplicate-props": "error",
"react/no-direct-mutation-state": "error",
"react/jsx-no-undef": "error",
"react/jsx-pascal-case": "error",
"react/no-typos": "error",
"react/prefer-es6-class": ["error", "always"],
"react/sort-comp": [
"error",
{
"order": [
"type-annotations",
"instance-variables",
"static-methods",
"lifecycle",
"instance-methods",
"/^handle.+$/",
"everything-else",
"rendering"
],
"groups": {
"rendering": ["/^render.+$/", "render"]
}
}
],
"jsx-quotes": ["Error", "prefer-double"],
"quote-props": [
"Error",
"as-needed",
{
"unnecessary": false
}
],
"jsx-a11y/label-has-associated-control": [
"error",
{
"required": {
"some": ["nesting", "id"]
}
}
],
"jsx-a11y/label-has-for": [
"error",
{
"required": {
"some": ["nesting", "id"]
}
}
]
},
"plugins": ["react"],
"rules": {
"react/react-in-jsx-scope": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
],
"no-eval": "error",
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}
],
"no-unused-expressions": "error",
"semi": ["error", "never"],
"semi-style": ["error", "last"]
}
}