-
Notifications
You must be signed in to change notification settings - Fork 35
/
.eslintrc.js
106 lines (102 loc) · 2.08 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
module.exports = {
"env": {
"es6": true,
},
"extends": [
"eslint:recommended",
"google",
"plugin:promise/recommended",
],
"parserOptions": {
"ecmaVersion": 2017,
"ecmaFeatures": {
},
},
"plugins": [
"promise",
],
"rules": {
"arrow-body-style": [
"error",
"as-needed",
{
"requireReturnForObjectLiteral": false,
}
],
"arrow-parens": ["error", "always"],
"arrow-spacing": [
"error",
{
"before": true,
"after": true,
}
],
"complexity": ["error", {"max": 6}],
"dot-location": ["error", "object"],
"eqeqeq": ["error", "always"],
"function-paren-newline": ["error", "consistent"],
"generator-star-spacing": ["error", "both"],
"implicit-arrow-linebreak": ["error", "beside"],
"indent": [
"error",
2,
{
"CallExpression": {
"arguments": 2,
},
"FunctionDeclaration": {
"parameters": 2,
"body": 1,
},
"FunctionExpression": {
// FIXME: 2 AND "first"
"parameters": 2,
"body": 1,
},
"MemberExpression": 2,
"SwitchCase": 1,
"VariableDeclarator": 1,
},
],
"linebreak-style": ["error", "unix"],
"max-depth": ["error", {"max": 5}],
"no-confusing-arrow": ["error", {"allowParens": true}],
"no-console": [
"error",
{
allow: [
"dir",
"error",
]
}
],
"no-extra-parens": [
"error",
"all",
{
"enforceForArrowConditionals": false,
},
],
"no-lone-blocks": "error",
"no-param-reassign": [
"error",
{
"props": true,
},
],
"prefer-template": "error",
"promise/avoid-new": "off",
"quotes": [
"error",
"double",
{
"allowTemplateLiterals": true,
}
],
"require-jsdoc": "off",
"semi": ["error", "always"],
"strict": ["error", "global"],
"template-curly-spacing": "error",
"wrap-iife": ["error", "inside"],
},
};