-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
172 lines (170 loc) · 4.23 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
171
172
{
"root": true,
"env": {
"node": true,
"browser": true,
"es6": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
// Auto-fixable
"array-bracket-spacing": "error",
"array-bracket-newline": [
"error",
{ "minItems": 3 }
],
"array-element-newline": [
"error",
{ "minItems": 3 }
],
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": ["error", "as-needed"],
"block-spacing": "error",
"brace-style": [
"error",
"1tbs",
{ "allowSingleLine": true }
],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": "error",
"curly": "error",
"dot-location": ["error", "property"],
"dot-notation": "error",
"eol-last": "error",
"eqeqeq": "error",
"func-call-spacing": "error",
"function-call-argument-newline": ["error", "consistent"],
"function-paren-newline": ["error", "multiline-arguments"],
"implicit-arrow-linebreak": "error",
"indent": [
"error",
2,
{
"SwitchCase": 1,
"ObjectExpression": 1
}
],
"jsx-quotes": "error",
"key-spacing": "error",
"keyword-spacing": [
"error",
{
"after": true,
"before": true,
"overrides": {
"switch": {
"after": false
},
"case": {
"before": false
}
}
}
],
"linebreak-style": "error",
"lines-around-comment": "error",
"newline-per-chained-call": "error",
"no-confusing-arrow": "error",
"no-else-return": "error",
"no-empty": "off",
"no-extra-bind": "error",
"no-implicit-coercion": [2, { "allow": ["!!", "~"] } ],
"no-lonely-if": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-unneeded-ternary": "error",
"no-useless-return": "error",
"no-var": "error",
"no-whitespace-before-property": "error",
"object-curly-spacing": [
"error",
"always"
],
"object-curly-newline": [
"error",
{
"multiline": true,
"minProperties": 3
}
],
"object-property-newline": "error",
"object-shorthand": "error",
"one-var": [
"error",
{
"let": "never",
"const": "never",
"separateRequires": true
}
],
"operator-assignment": "error",
"operator-linebreak": ["error", "before"],
"padded-blocks": ["error", "never"],
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": ["let", "const"],
"next": "block-like"
},
{
"blankLine": "always",
"prev": "*",
"next": ["return"]
},
{
"blankLine": "never",
"prev": "*",
"next": ["case", "default"]
}
],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-exponentiation-operator": "error",
"prefer-template": "error",
"quote-props": ["error", "consistent"],
"quotes": ["error", "single"],
"rest-spread-spacing": "error",
"semi": "error",
"semi-style": "error",
"space-before-blocks": "error",
"space-before-function-paren": [
"error",
{"anonymous": "always", "named": "never", "asyncArrow": "always"}
],
"space-in-parens": ["error", "never"],
"spaced-comment": "error",
"template-curly-spacing": "error",
"unicode-bom": "error",
"yoda": "error",
// Non-auto-fixable
"accessor-pairs": "error",
"consistent-return": "error",
"no-prototype-builtins": "off",
// Plugins
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/ban-types": "off"
},
"overrides": [{
"files": ["**/*.d.ts"],
"parser": "@typescript-eslint/parser",
"rules": {
"dot-notation": "off"
}
}]
}