Skip to content

Commit 1f0a998

Browse files
committed
Merge branch 'master' into zhangciwu-post-json-body
2 parents 6a654a0 + 0f25742 commit 1f0a998

File tree

7 files changed

+3728
-2381
lines changed

7 files changed

+3728
-2381
lines changed

.eslintrc.js

Lines changed: 31 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
"warn",
2525
"always"
2626
],
27-
"brace-style": [
27+
"brace-style": [
2828
"error",
2929
"1tbs"
3030
],
@@ -33,7 +33,6 @@ module.exports = {
3333
"warn",
3434
{ "properties": "always" }
3535
],
36-
"capitalized-comments": "off",
3736
"class-methods-use-this": "error",
3837
"comma-dangle": [
3938
"error",
@@ -53,7 +52,10 @@ module.exports = {
5352
"outerThis",
5453
"self"
5554
],
56-
"curly": "error",
55+
"curly": [
56+
"error",
57+
"all"
58+
],
5759
"default-case": "error",
5860
"dot-location": [
5961
"error",
@@ -64,24 +66,14 @@ module.exports = {
6466
"eqeqeq": "error",
6567
"func-call-spacing": "error",
6668
"func-name-matching": "error",
67-
"func-names": "off",
68-
"func-style": "off",
69-
"generator-star-spacing": "error",
70-
"global-require": "error",
71-
"guard-for-in": "warn",
72-
"handle-callback-err": "error",
73-
"id-blacklist": "error",
7469
"id-length": [
7570
"warn",
7671
{ "exceptions": ["$","e","i","j"] }
7772
],
78-
"id-match": "error",
7973
"indent": [
8074
"error",
8175
"tab"
8276
],
83-
"init-declarations": "off",
84-
"jsx-quotes": "error",
8577
"key-spacing": [
8678
"warn", {
8779
"singleLine": {
@@ -96,16 +88,11 @@ module.exports = {
9688
}
9789
],
9890
"keyword-spacing": "error",
99-
"line-comment-position": "off",
10091
"linebreak-style": [
10192
"warn",
10293
"unix"
10394
],
104-
"lines-around-comment": "off",
105-
"lines-around-directive": "off",
10695
"max-depth": "warn",
107-
"max-len": "off",
108-
"max-lines": "off",
10996
"max-nested-callbacks": "error",
11097
"max-params": [
11198
"warn",
@@ -124,8 +111,6 @@ module.exports = {
124111
"never"
125112
],
126113
"new-parens": "error",
127-
"newline-after-var": "warn",
128-
"newline-before-return": "error",
129114
"newline-per-chained-call": [
130115
"warn",
131116
{ "ignoreChainWithDepth": 3 }
@@ -135,13 +120,15 @@ module.exports = {
135120
"no-await-in-loop": "error",
136121
"no-bitwise": "error",
137122
"no-caller": "error",
138-
"no-catch-shadow": "warn",
139123
"no-compare-neg-zero": "error",
140124
"no-confusing-arrow": "error",
141125
"no-continue": "warn",
142126
"no-div-regex": "error",
143127
"no-duplicate-imports": "error",
144-
"no-else-return": "error",
128+
"no-else-return": [
129+
"error",
130+
{ "allowElseIf": false }
131+
],
145132
"no-empty": [
146133
"error",
147134
{ "allowEmptyCatch": true }
@@ -170,12 +157,11 @@ module.exports = {
170157
"no-global-assign": "error",
171158
"no-implicit-globals": "error",
172159
"no-implied-eval": "error",
173-
"no-inline-comments": "off",
174160
"no-inner-declarations": [
175161
"warn",
176162
"both"
177163
],
178-
"no-invalid-this": "off",
164+
"no-invalid-this": "warn",
179165
"no-iterator": "error",
180166
"no-label-var": "error",
181167
"no-labels": "error",
@@ -210,9 +196,7 @@ module.exports = {
210196
"no-new-require": "error",
211197
"no-new-wrappers": "error",
212198
"no-octal-escape": "error",
213-
"no-param-reassign": "off",
214199
"no-path-concat": "error",
215-
"no-plusplus": "off",
216200
"no-process-env": "error",
217201
"no-process-exit": "error",
218202
"no-proto": "error",
@@ -229,9 +213,7 @@ module.exports = {
229213
"no-sequences": "error",
230214
"no-shadow": "warn",
231215
"no-shadow-restricted-names": "error",
232-
"no-spaced-func": "error",
233216
"no-sync": "warn",
234-
"no-tabs": "off",
235217
"no-template-curly-in-string": "error",
236218
"no-ternary": "warn",
237219
"no-throw-literal": "warn",
@@ -263,7 +245,7 @@ module.exports = {
263245
"no-useless-escape": "error",
264246
"no-useless-rename": "error",
265247
"no-useless-return": "error",
266-
"no-var": "off",
248+
"no-var": "warn",
267249
"no-void": "error",
268250
"no-warning-comments": "warn",
269251
"no-whitespace-before-property": "error",
@@ -288,22 +270,21 @@ module.exports = {
288270
"warn",
289271
"consistent"
290272
],
291-
"one-var": "off",
292-
"one-var-declaration-per-line": "off",
293273
"operator-assignment": [
294274
"error",
295275
"always"
296276
],
297277
"operator-linebreak": "error",
298-
"padded-blocks": "off",
299-
"prefer-arrow-callback": "off",
278+
"padding-line-between-statements": [
279+
"warn",
280+
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*"},
281+
{ "blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"]},
282+
{ "blankLine": "always", "prev": "directive", "next": "*" },
283+
{ "blankLine": "any", "prev": "directive", "next": "directive" },
284+
{ "blankLine": "always", "prev": "*", "next": "return" }
285+
],
300286
"prefer-const": "error",
301-
"prefer-destructuring": "off",
302-
"prefer-numeric-literals": "off",
303287
"prefer-promise-reject-errors": "error",
304-
"prefer-rest-params": "off",
305-
"prefer-spread": "off",
306-
"prefer-template": "off",
307288
"quote-props": [
308289
"warn",
309290
"consistent-as-needed"
@@ -318,15 +299,24 @@ module.exports = {
318299
],
319300
"radix": "error",
320301
"require-await": "error",
321-
"require-jsdoc": "off",
322302
"rest-spread-spacing": "error",
323-
"semi": "error",
303+
"semi": [
304+
"error",
305+
"always"
306+
],
324307
"semi-spacing": "error",
325308
"sort-imports": "error",
326309
"sort-keys": "warn",
327310
"sort-vars": "warn",
328311
"space-before-blocks": "warn",
329-
"space-before-function-paren": "off",
312+
"space-before-function-paren": [
313+
"warn",
314+
{
315+
"anonymous": "ignore",
316+
"named": "never",
317+
"asyncArrow": "ignore"
318+
}
319+
],
330320
"space-in-parens": "warn",
331321
"space-infix-ops": "error",
332322
"space-unary-ops": "error",
@@ -345,14 +335,11 @@ module.exports = {
345335
"warn",
346336
"function"
347337
],
348-
"symbol-description": "off",
349338
"template-curly-spacing": "error",
350339
"template-tag-spacing": "error",
351340
"unicode-bom": "error",
352-
"valid-jsdoc": "warn",
353341
"vars-on-top": "warn",
354342
"wrap-iife": "error",
355-
"wrap-regex": "off",
356343
"yield-star-spacing": "error",
357344
"yoda": "error"
358345
}

0 commit comments

Comments
 (0)