-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc
212 lines (212 loc) · 6.46 KB
/
.eslintrc
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
{
"extends": [ "eslint:recommended" ],
"plugins": [ "import", "sort-destructure-keys" ],
"parserOptions": {
"sourceType": "module"
},
"env": {
"node": true,
"es2017": true,
"jest": true
},
"reportUnusedDisableDirectives": true,
"rules": {
"arrow-body-style": 2,
"array-bracket-newline": [ 2, "consistent" ],
"array-bracket-spacing": [ 2, "always", {
"arraysInArrays": false,
"objectsInArrays": false
} ],
"arrow-spacing": 2,
"block-spacing": [ 2, "always" ],
"comma-dangle": [ 2, "always-multiline" ],
"comma-spacing": 2,
"comma-style": 2,
"computed-property-spacing": 2,
"curly": 2,
"dot-location": [ 2, "property" ],
"dot-notation": 2,
"eol-last": 2,
"eqeqeq": [ 2, "smart" ],
"func-call-spacing": 2,
"function-paren-newline": [ 2, "consistent" ],
"id-blacklist": [
"error", "any",
"Number", "number",
"String", "string",
"Boolean", "boolean",
"function", "Function"
],
"import/order": 2,
"indent": [ 2, 2, { "SwitchCase": 1 } ],
"key-spacing": 2,
"keyword-spacing": 2,
"lines-between-class-members": [ 2, "always", { "exceptAfterSingleLine": true } ],
"max-classes-per-file": [ 2, 1 ],
"max-len": [ 2, {
"code": 120,
"ignoreTrailingComments": true
} ],
"new-parens": 2,
"no-array-constructor": 2,
"no-caller": 2,
"no-console": 2,
"no-div-regex": 2,
"no-else-return": 2,
"no-empty-function": [ 2, { "allow": [ "arrowFunctions" ] } ],
"no-eval": 2,
"no-extra-bind": 2,
"no-extra-label": 2,
"no-extra-parens": 2,
"no-fallthrough": 0,
"no-floating-decimal": 2,
"no-implicit-coercion": [ 2, { "allow": [ "!!" ] } ],
"no-import-assign": 2,
"no-label-var": 2,
"no-lonely-if": 2,
"no-multiple-empty-lines": [ 1, {
"max": 1,
"maxEOF": 0
} ],
"no-multi-spaces": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-path-concat": 2,
"no-plusplus": 2,
"no-shadow": [ 2, { "hoist": "all" } ],
"no-throw-literal": 2,
"no-trailing-spaces": 2,
"no-undef-init": 2,
"no-unneeded-ternary": 2,
"no-unused-expressions": 2,
"no-unused-vars": [ 2, { "varsIgnorePattern": "^_" } ],
"no-useless-computed-key": 2,
"no-useless-rename": 2,
"no-useless-return": 2,
"no-var": 2,
"no-whitespace-before-property": 2,
"object-curly-newline": [ 2, {
"multiline": true,
"consistent": true
} ],
"object-curly-spacing": [ 2, "always" ],
"object-shorthand": 2,
"one-var": [ 2, "never" ],
"operator-assignment": 2,
"operator-linebreak": [ 2, "after" ],
"prefer-arrow-callback": 2,
"prefer-const": 2,
"prefer-destructuring": 2,
"prefer-exponentiation-operator": 2,
"prefer-object-spread": 2,
"prefer-template": 2,
"quote-props": [ 2, "consistent-as-needed", { "numbers": true } ],
"require-await": 2,
"rest-spread-spacing": 2,
"space-before-function-paren": [ 2, {
"anonymous": "never",
"named": "never"
} ],
"quotes": [ 2, "backtick" ],
"semi": [ 2, "always" ],
"semi-spacing": 2,
"semi-style": [ 2, "last" ],
"sort-destructure-keys/sort-destructure-keys": 2,
"sort-imports": [ 2, {
"ignoreCase": true,
"ignoreDeclarationSort": true
} ],
"sort-keys": 2,
"sort-vars": [ 2, { "ignoreCase": true } ],
"space-before-blocks": 2,
"space-infix-ops": 2,
"space-in-parens": 2,
"space-unary-ops": 2,
"spaced-comment": 2,
"switch-colon-spacing": 2,
"template-curly-spacing": 2,
"wrap-iife": 2
},
"overrides": [
{
"files": [ "*.ts", "*.tsx" ],
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended", // extends key not inherited from root
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"plugins": [ "@typescript-eslint" ],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"no-invalid-this": 0,
"no-useless-return": 0,
"@typescript-eslint/array-type": [ 2, {
"default": "array-simple",
"readonly": "array-simple"
} ],
"@typescript-eslint/ban-types": [ 2, {
"types": {
"Object": { "message": "Prefer: { }", "fixWith": "{ }" }
}
} ],
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/consistent-type-definitions": 2,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-member-accessibility": [ 2, {
"accessibility": "explicit"
} ],
"func-call-spacing": 0,
"@typescript-eslint/func-call-spacing": 2,
"indent": 0,
"@typescript-eslint/indent": [ 2, 2, {
"SwitchCase": 1
} ],
"@typescript-eslint/naming-convention": [ 2, {
"selector": "interface",
"format": ["PascalCase"]
}
],
"@typescript-eslint/no-misused-promises": [ 2, { "checksVoidReturn": false } ],
"@typescript-eslint/member-delimiter-style": [ 2, {
"singleline": { "delimiter": "comma" }
} ],
"no-empty-function": 0,
"@typescript-eslint/no-empty-function": [ 2, {
"allow": [ "arrowFunctions" ]
} ],
"@typescript-eslint/no-explicit-any": 0,
"no-extra-parens": 0,
"@typescript-eslint/no-extra-parens": 2,
"no-extra-semi": 0,
"@typescript-eslint/no-extra-semi": 2,
"no-unused-vars": 0,
"@typescript-eslint/no-unused-vars": [ 2, {
"varsIgnorePattern": "^_"
} ],
"@typescript-eslint/no-var-requires": 2,
"@typescript-eslint/prefer-for-of": 2,
"@typescript-eslint/prefer-function-type": 2,
"quotes": 0,
"@typescript-eslint/quotes": [ 2, "backtick", {
"avoidEscape": true
} ],
"require-await": 0,
"@typescript-eslint/require-await": 2,
"semi": 0,
"@typescript-eslint/semi": [ 2, "always" ],
"space-before-function-paren": 0,
"@typescript-eslint/space-before-function-paren": [ 2, {
"anonymous": "never",
"named": "never"
} ],
"@typescript-eslint/type-annotation-spacing": 2,
"@typescript-eslint/unbound-method": 0,
"@typescript-eslint/unified-signatures": 2
}
}
]
}