-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
110 lines (105 loc) · 4.01 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
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
//
module.exports = {
parserOptions: {
ecmaVersion: 2018,
sourceType: "script",
ecmaFeatures: {
spread: true,
}
},
env: {
es6: true,
browser: false,
node: true
},
rules: {
"no-await-in-loop": "error",
complexity: "warn",
"default-case": "warn",
"no-return-assign": "error",
"no-useless-call": "warn",
"no-useless-concat": "warn",
"no-useless-return": "error",
radix: "error",
"require-await": "warn",
"no-labels": "error",
"no-use-before-define": "warn",
"global-require": "warn",
"handle-callback-err": "error",
"no-mixed-requires": "error",
"no-new-require": "error",
"eol-last": "error",
"array-element-newline": ["warn", { multiline: true, minItems: 5 }],
indent: ["warn", 2],
"comma-dangle": "off",
"comma-spacing": ["warn", { before: false, after: true }],
"max-depth": ["error", 5],
"max-len": [
"error",
{
code: 120,
tabWidth: 2,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true
}
],
"max-lines": [
"error", { max: 500, skipBlankLines: true, skipComments: true }
],
"max-lines-per-function": ["error", { max: 80, skipBlankLines: false, skipComments: true, IIFEs: false }],
"max-nested-callbacks": "error",
"max-params": ["error", { max: 6 }],
"max-statements": "off",
"max-statements-per-line": ["error", { max: 1 }],
"multiline-ternary": ["error", "always-multiline"],
"new-cap": "error",
"new-parens": "error",
"newline-per-chained-call": "warn",
"no-multi-assign": "error",
"no-nested-ternary": "error",
"no-tabs": "error",
"no-trailing-spaces": "error",
"one-var-declaration-per-line": "error",
"padded-blocks": ["warn", { classes: "always" }, { allowSingleLineBlocks: true }],
"prefer-object-spread": "error",
quotes: ["error", "single", { avoidEscape: true, allowTemplateLiterals: true }],
semi: "error",
"space-before-blocks": ["warn", { functions: "always", keywords: "always", classes: "always" }],
"space-infix-ops": "error",
"space-unary-ops": ["error", { words: true, nonwords: false }],
"spaced-comment": ["error", "always", {
line: { markers: [], exceptions: [] },
block: { markers: [], exceptions: [], balanced: true }
}],
"template-tag-spacing": ["error", "always"],
"arrow-body-style": ["error", "as-needed", { requireReturnForObjectLiteral: true }],
"arrow-parens": ["warn", "as-needed", { requireForBlockBody: false }],
"arrow-spacing": ["error", { before: true, after: true }],
"generator-star-spacing": ["error", { before: true, after: false }],
"no-confusing-arrow": ["error", { allowParens: false }],
"no-var": "error",
"no-useless-rename": "error",
"no-useless-computed-key": "warn",
"no-useless-escape": "error",
"prefer-const": "error",
"prefer-arrow-callback": ["warn", { allowNamedFunctions: true, allowUnboundThis: true }],
"prefer-destructuring": [
"error", {
VariableDeclarator: { array: true, object: true },
AssignmentExpression: { array: true, object: true }
},
{ enforceForRenamedProperties: false }
],
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "warn",
"rest-spread-spacing": ["error", "never"],
"symbol-description": "error",
"template-curly-spacing": ["error", "never"],
"no-template-curly-in-string": "error",
"yield-star-spacing": ["error", "after"],
"key-spacing": ["warn"]
}
};