@ololoepepe/eslint-config 0.0.21 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/README.md +127 -1
- package/package.json +30 -10
- package/src/index.js +58 -297
- package/src/node.js +23 -0
- package/src/plugins/eslint-comments.js +12 -0
- package/src/plugins/import-x.js +107 -0
- package/src/plugins/n.js +43 -0
- package/src/plugins/promise.js +23 -0
- package/src/plugins/react-hooks.js +30 -0
- package/src/plugins/react.js +89 -0
- package/src/plugins/regexp.js +90 -0
- package/src/plugins/sort-keys-shorthand.js +7 -9
- package/src/plugins/stylistic.js +395 -0
- package/src/plugins/unicorn.js +321 -0
- package/src/react.js +40 -0
- package/src/rules/core.js +261 -0
- package/src/rules/jsx-stylistic.js +60 -0
- package/src/rules/no.js +237 -158
- package/src/plugins/import.js +0 -107
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
export const rules = {
|
|
2
|
+
'@stylistic/array-bracket-newline': [
|
|
3
|
+
'error',
|
|
4
|
+
'consistent'
|
|
5
|
+
],
|
|
6
|
+
'@stylistic/array-bracket-spacing': [
|
|
7
|
+
'error',
|
|
8
|
+
'never',
|
|
9
|
+
{
|
|
10
|
+
arraysInArrays: false,
|
|
11
|
+
objectsInArrays: false,
|
|
12
|
+
singleValue: false
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
'@stylistic/array-element-newline': [
|
|
16
|
+
'error',
|
|
17
|
+
'consistent'
|
|
18
|
+
],
|
|
19
|
+
'@stylistic/arrow-parens': [
|
|
20
|
+
'error',
|
|
21
|
+
'as-needed',
|
|
22
|
+
{
|
|
23
|
+
requireForBlockBody: false
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
'@stylistic/arrow-spacing': [
|
|
27
|
+
'error',
|
|
28
|
+
{
|
|
29
|
+
after: true,
|
|
30
|
+
before: true
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
'@stylistic/block-spacing': [
|
|
34
|
+
'error',
|
|
35
|
+
'always'
|
|
36
|
+
],
|
|
37
|
+
'@stylistic/brace-style': [
|
|
38
|
+
'error',
|
|
39
|
+
'1tbs',
|
|
40
|
+
{
|
|
41
|
+
allowSingleLine: false
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
'@stylistic/comma-dangle': [
|
|
45
|
+
'error',
|
|
46
|
+
'never'
|
|
47
|
+
],
|
|
48
|
+
'@stylistic/comma-spacing': [
|
|
49
|
+
'error',
|
|
50
|
+
{
|
|
51
|
+
after: true,
|
|
52
|
+
before: false
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
'@stylistic/comma-style': [
|
|
56
|
+
'error',
|
|
57
|
+
'last'
|
|
58
|
+
],
|
|
59
|
+
'@stylistic/computed-property-spacing': [
|
|
60
|
+
'error',
|
|
61
|
+
'never',
|
|
62
|
+
{
|
|
63
|
+
enforceForClassMembers: true
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
'@stylistic/curly-newline': 'off',
|
|
67
|
+
'@stylistic/dot-location': [
|
|
68
|
+
'error',
|
|
69
|
+
'property'
|
|
70
|
+
],
|
|
71
|
+
'@stylistic/eol-last': [
|
|
72
|
+
'error',
|
|
73
|
+
'always'
|
|
74
|
+
],
|
|
75
|
+
'@stylistic/exp-jsx-props-style': 'off',
|
|
76
|
+
'@stylistic/exp-list-style': 'off',
|
|
77
|
+
'@stylistic/function-call-argument-newline': [
|
|
78
|
+
'error',
|
|
79
|
+
'consistent'
|
|
80
|
+
],
|
|
81
|
+
'@stylistic/function-call-spacing': [
|
|
82
|
+
'error',
|
|
83
|
+
'never'
|
|
84
|
+
],
|
|
85
|
+
'@stylistic/function-paren-newline': [
|
|
86
|
+
'error',
|
|
87
|
+
'multiline-arguments'
|
|
88
|
+
],
|
|
89
|
+
'@stylistic/generator-star-spacing': [
|
|
90
|
+
'error',
|
|
91
|
+
{
|
|
92
|
+
after: true,
|
|
93
|
+
before: true
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
'@stylistic/implicit-arrow-linebreak': [
|
|
97
|
+
'error',
|
|
98
|
+
'beside'
|
|
99
|
+
],
|
|
100
|
+
'@stylistic/indent': [
|
|
101
|
+
'error',
|
|
102
|
+
2
|
|
103
|
+
],
|
|
104
|
+
'@stylistic/indent-binary-ops': [
|
|
105
|
+
'error',
|
|
106
|
+
2
|
|
107
|
+
],
|
|
108
|
+
'@stylistic/jsx-child-element-spacing': 'off',
|
|
109
|
+
'@stylistic/jsx-closing-bracket-location': 'off',
|
|
110
|
+
'@stylistic/jsx-closing-tag-location': 'off',
|
|
111
|
+
'@stylistic/jsx-curly-brace-presence': 'off',
|
|
112
|
+
'@stylistic/jsx-curly-newline': 'off',
|
|
113
|
+
'@stylistic/jsx-curly-spacing': 'off',
|
|
114
|
+
'@stylistic/jsx-equals-spacing': 'off',
|
|
115
|
+
'@stylistic/jsx-first-prop-new-line': 'off',
|
|
116
|
+
'@stylistic/jsx-function-call-newline': 'off',
|
|
117
|
+
'@stylistic/jsx-indent-props': 'off',
|
|
118
|
+
'@stylistic/jsx-max-props-per-line': 'off',
|
|
119
|
+
'@stylistic/jsx-newline': 'off',
|
|
120
|
+
'@stylistic/jsx-one-expression-per-line': 'off',
|
|
121
|
+
'@stylistic/jsx-pascal-case': 'off',
|
|
122
|
+
'@stylistic/jsx-quotes': [
|
|
123
|
+
'error',
|
|
124
|
+
'prefer-double'
|
|
125
|
+
],
|
|
126
|
+
'@stylistic/jsx-self-closing-comp': 'off',
|
|
127
|
+
'@stylistic/jsx-tag-spacing': 'off',
|
|
128
|
+
'@stylistic/jsx-wrap-multilines': 'off',
|
|
129
|
+
'@stylistic/key-spacing': [
|
|
130
|
+
'error',
|
|
131
|
+
{
|
|
132
|
+
afterColon: true,
|
|
133
|
+
beforeColon: false
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
'@stylistic/keyword-spacing': [
|
|
137
|
+
'error',
|
|
138
|
+
{
|
|
139
|
+
after: true,
|
|
140
|
+
before: true
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
'@stylistic/line-comment-position': 'off',
|
|
144
|
+
'@stylistic/linebreak-style': [
|
|
145
|
+
'error',
|
|
146
|
+
'unix'
|
|
147
|
+
],
|
|
148
|
+
'@stylistic/lines-around-comment': 'off',
|
|
149
|
+
'@stylistic/lines-between-class-members': [
|
|
150
|
+
'error',
|
|
151
|
+
'always',
|
|
152
|
+
{
|
|
153
|
+
exceptAfterSingleLine: true
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
'@stylistic/max-len': [
|
|
157
|
+
'error',
|
|
158
|
+
{
|
|
159
|
+
code: 120,
|
|
160
|
+
comments: 120,
|
|
161
|
+
ignoreComments: false,
|
|
162
|
+
ignoreRegExpLiterals: false,
|
|
163
|
+
ignoreStrings: false,
|
|
164
|
+
ignoreTemplateLiterals: false,
|
|
165
|
+
ignoreTrailingComments: false,
|
|
166
|
+
ignoreUrls: false,
|
|
167
|
+
tabWidth: 2
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
'@stylistic/max-statements-per-line': [
|
|
171
|
+
'error',
|
|
172
|
+
{
|
|
173
|
+
max: 1
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
'@stylistic/member-delimiter-style': 'off',
|
|
177
|
+
'@stylistic/multiline-comment-style': 'off',
|
|
178
|
+
'@stylistic/multiline-ternary': 'off',
|
|
179
|
+
'@stylistic/new-parens': [
|
|
180
|
+
'error',
|
|
181
|
+
'always'
|
|
182
|
+
],
|
|
183
|
+
'@stylistic/newline-per-chained-call': [
|
|
184
|
+
'error',
|
|
185
|
+
{
|
|
186
|
+
ignoreChainWithDepth: 3
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
'@stylistic/no-confusing-arrow': [
|
|
190
|
+
'error',
|
|
191
|
+
{
|
|
192
|
+
allowParens: true,
|
|
193
|
+
onlyOneSimpleParam: false
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
'@stylistic/no-extra-parens': 'off',
|
|
197
|
+
'@stylistic/no-extra-semi': 'error',
|
|
198
|
+
'@stylistic/no-floating-decimal': 'error',
|
|
199
|
+
'@stylistic/no-mixed-operators': [
|
|
200
|
+
'error',
|
|
201
|
+
{
|
|
202
|
+
allowSamePrecedence: true
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
|
206
|
+
'@stylistic/no-multi-spaces': [
|
|
207
|
+
'error',
|
|
208
|
+
{
|
|
209
|
+
exceptions: {
|
|
210
|
+
Property: false
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
'@stylistic/no-multiple-empty-lines': [
|
|
215
|
+
'error',
|
|
216
|
+
{
|
|
217
|
+
max: 1,
|
|
218
|
+
maxBOF: 0,
|
|
219
|
+
maxEOF: 1
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
'@stylistic/no-tabs': [
|
|
223
|
+
'error',
|
|
224
|
+
{
|
|
225
|
+
allowIndentationTabs: false
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
'@stylistic/no-trailing-spaces': [
|
|
229
|
+
'error',
|
|
230
|
+
{
|
|
231
|
+
ignoreComments: false,
|
|
232
|
+
skipBlankLines: false
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
'@stylistic/no-whitespace-before-property': 'error',
|
|
236
|
+
'@stylistic/nonblock-statement-body-position': 'off',
|
|
237
|
+
'@stylistic/object-curly-newline': 'off',
|
|
238
|
+
'@stylistic/object-curly-spacing': [
|
|
239
|
+
'error',
|
|
240
|
+
'never',
|
|
241
|
+
{
|
|
242
|
+
arraysInObjects: false,
|
|
243
|
+
objectsInObjects: false
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
'@stylistic/object-property-newline': 'off',
|
|
247
|
+
'@stylistic/one-var-declaration-per-line': 'off',
|
|
248
|
+
'@stylistic/operator-linebreak': [
|
|
249
|
+
'error',
|
|
250
|
+
'after'
|
|
251
|
+
],
|
|
252
|
+
'@stylistic/padded-blocks': [
|
|
253
|
+
'error',
|
|
254
|
+
'never',
|
|
255
|
+
{
|
|
256
|
+
allowSingleLineBlocks: false
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
'@stylistic/padding-line-between-statements': [
|
|
260
|
+
'error',
|
|
261
|
+
{
|
|
262
|
+
blankLine: 'always',
|
|
263
|
+
next: '*',
|
|
264
|
+
prev: 'multiline-block-like'
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
'@stylistic/quote-props': [
|
|
268
|
+
'error',
|
|
269
|
+
'as-needed',
|
|
270
|
+
{
|
|
271
|
+
keywords: false,
|
|
272
|
+
numbers: true,
|
|
273
|
+
unnecessary: true
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
'@stylistic/quotes': [
|
|
277
|
+
'error',
|
|
278
|
+
'single',
|
|
279
|
+
{
|
|
280
|
+
allowTemplateLiterals: 'never',
|
|
281
|
+
avoidEscape: true
|
|
282
|
+
}
|
|
283
|
+
],
|
|
284
|
+
'@stylistic/rest-spread-spacing': [
|
|
285
|
+
'error',
|
|
286
|
+
'never'
|
|
287
|
+
],
|
|
288
|
+
'@stylistic/semi': [
|
|
289
|
+
'error',
|
|
290
|
+
'always',
|
|
291
|
+
{
|
|
292
|
+
omitLastInOneLineBlock: false
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
'@stylistic/semi-spacing': [
|
|
296
|
+
'error',
|
|
297
|
+
{
|
|
298
|
+
after: true,
|
|
299
|
+
before: false
|
|
300
|
+
}
|
|
301
|
+
],
|
|
302
|
+
'@stylistic/semi-style': [
|
|
303
|
+
'error',
|
|
304
|
+
'last'
|
|
305
|
+
],
|
|
306
|
+
'@stylistic/space-before-blocks': [
|
|
307
|
+
'error',
|
|
308
|
+
'always'
|
|
309
|
+
],
|
|
310
|
+
'@stylistic/space-before-function-paren': [
|
|
311
|
+
'error',
|
|
312
|
+
{
|
|
313
|
+
anonymous: 'always',
|
|
314
|
+
asyncArrow: 'always',
|
|
315
|
+
named: 'never'
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
'@stylistic/space-in-parens': [
|
|
319
|
+
'error',
|
|
320
|
+
'never'
|
|
321
|
+
],
|
|
322
|
+
'@stylistic/space-infix-ops': [
|
|
323
|
+
'error',
|
|
324
|
+
{
|
|
325
|
+
int32Hint: false
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
'@stylistic/space-unary-ops': [
|
|
329
|
+
'error',
|
|
330
|
+
{
|
|
331
|
+
nonwords: false,
|
|
332
|
+
words: true
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
'@stylistic/spaced-comment': [
|
|
336
|
+
'error',
|
|
337
|
+
'always',
|
|
338
|
+
{
|
|
339
|
+
block: {
|
|
340
|
+
balanced: true,
|
|
341
|
+
exceptions: [
|
|
342
|
+
'-',
|
|
343
|
+
'+',
|
|
344
|
+
'*'
|
|
345
|
+
],
|
|
346
|
+
markers: [
|
|
347
|
+
'!',
|
|
348
|
+
'*'
|
|
349
|
+
]
|
|
350
|
+
},
|
|
351
|
+
line: {
|
|
352
|
+
exceptions: [
|
|
353
|
+
'-',
|
|
354
|
+
'+',
|
|
355
|
+
'*'
|
|
356
|
+
],
|
|
357
|
+
markers: [
|
|
358
|
+
'!',
|
|
359
|
+
'/',
|
|
360
|
+
'=>'
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
],
|
|
365
|
+
'@stylistic/switch-colon-spacing': [
|
|
366
|
+
'error',
|
|
367
|
+
{
|
|
368
|
+
after: true,
|
|
369
|
+
before: false
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
'@stylistic/template-curly-spacing': [
|
|
373
|
+
'error',
|
|
374
|
+
'never'
|
|
375
|
+
],
|
|
376
|
+
'@stylistic/template-tag-spacing': [
|
|
377
|
+
'error',
|
|
378
|
+
'never'
|
|
379
|
+
],
|
|
380
|
+
'@stylistic/type-annotation-spacing': 'off',
|
|
381
|
+
'@stylistic/type-generic-spacing': 'off',
|
|
382
|
+
'@stylistic/type-named-tuple-spacing': 'off',
|
|
383
|
+
'@stylistic/wrap-iife': [
|
|
384
|
+
'error',
|
|
385
|
+
'inside',
|
|
386
|
+
{
|
|
387
|
+
functionPrototypeMethods: true
|
|
388
|
+
}
|
|
389
|
+
],
|
|
390
|
+
'@stylistic/wrap-regex': 'off',
|
|
391
|
+
'@stylistic/yield-star-spacing': [
|
|
392
|
+
'error',
|
|
393
|
+
'both'
|
|
394
|
+
]
|
|
395
|
+
};
|