@origin-1/eslint-config 0.18.1 → 0.20.0
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/lib/rules.js +152 -106
- package/package.json +5 -4
package/lib/rules.js
CHANGED
|
@@ -108,7 +108,6 @@ exports.RULES = {
|
|
|
108
108
|
'max-lines': 'off',
|
|
109
109
|
'max-lines-per-function': 'off',
|
|
110
110
|
'max-nested-callbacks': 'off',
|
|
111
|
-
'max-params': 'off',
|
|
112
111
|
'max-statements': 'off',
|
|
113
112
|
'multiline-comment-style': 'off',
|
|
114
113
|
'new-cap': ['error', { capIsNew: false }],
|
|
@@ -116,7 +115,6 @@ exports.RULES = {
|
|
|
116
115
|
'no-bitwise': 'off',
|
|
117
116
|
'no-caller': ['error'],
|
|
118
117
|
'no-case-declarations': ['error'],
|
|
119
|
-
'no-confusing-arrow': 'off',
|
|
120
118
|
'no-console': 'off',
|
|
121
119
|
'no-continue': 'off',
|
|
122
120
|
'no-delete-var': ['error'],
|
|
@@ -130,7 +128,6 @@ exports.RULES = {
|
|
|
130
128
|
'no-extra-bind': ['error'],
|
|
131
129
|
'no-extra-boolean-cast': ['error'],
|
|
132
130
|
'no-extra-label': ['error'],
|
|
133
|
-
'no-floating-decimal': ['error'],
|
|
134
131
|
'no-global-assign': ['error'],
|
|
135
132
|
'no-implicit-coercion': 'off',
|
|
136
133
|
'no-implicit-globals': 'off',
|
|
@@ -140,7 +137,6 @@ exports.RULES = {
|
|
|
140
137
|
'no-labels': ['error', { allowLoop: true, allowSwitch: true }],
|
|
141
138
|
'no-lone-blocks': beforeJSOrElse(2015, ['error'], 'off'),
|
|
142
139
|
'no-lonely-if': 'off',
|
|
143
|
-
'no-mixed-operators': 'off',
|
|
144
140
|
'no-multi-assign': 'off',
|
|
145
141
|
'no-multi-str': ['error'],
|
|
146
142
|
'no-negated-condition': 'off',
|
|
@@ -183,7 +179,6 @@ exports.RULES = {
|
|
|
183
179
|
'no-with': ['error'],
|
|
184
180
|
'object-shorthand': beforeJSOrElse(2015, 'off', ['error', 'always', { avoidQuotes: true }]),
|
|
185
181
|
'one-var': ['error', 'never'],
|
|
186
|
-
'one-var-declaration-per-line': ['error'],
|
|
187
182
|
'operator-assignment': ['error'],
|
|
188
183
|
'prefer-arrow-callback': beforeJSOrElse(2015, 'off', ['error']),
|
|
189
184
|
'prefer-const': ['error', { ignoreReadBeforeAssign: true }],
|
|
@@ -197,66 +192,18 @@ exports.RULES = {
|
|
|
197
192
|
'prefer-rest-params': beforeJSOrElse(2015, 'off', ['error']),
|
|
198
193
|
'prefer-spread': beforeJSOrElse(2015, 'off', ['error']),
|
|
199
194
|
'prefer-template': beforeJSOrElse(2015, 'off', ['error']),
|
|
200
|
-
'quote-props': 'off',
|
|
201
195
|
'radix': ['error'],
|
|
202
196
|
'require-unicode-regexp': 'off',
|
|
203
197
|
'require-yield': ['error'],
|
|
204
198
|
'sort-imports': ['error', { ignoreDeclarationSort: true }],
|
|
205
199
|
'sort-keys': 'off',
|
|
206
200
|
'sort-vars': 'off',
|
|
207
|
-
'spaced-comment': [
|
|
208
|
-
'error',
|
|
209
|
-
'always',
|
|
210
|
-
{ block: { exceptions: ['*'] }, line: { exceptions: ['/'], markers: ['/'] } },
|
|
211
|
-
],
|
|
212
201
|
'strict': jsts(['error', 'global'], 'off'),
|
|
213
202
|
'symbol-description': 'off',
|
|
214
203
|
'vars-on-top': 'off',
|
|
215
204
|
'yoda': ['error'],
|
|
216
|
-
'array-bracket-newline': 'off',
|
|
217
|
-
'array-bracket-spacing': ['error'],
|
|
218
|
-
'array-element-newline': 'off',
|
|
219
|
-
'arrow-parens': ['error', 'as-needed'],
|
|
220
|
-
'arrow-spacing': ['error'],
|
|
221
|
-
'comma-style': ['error', 'last', { exceptions: { ArrayExpression: true } }],
|
|
222
|
-
'computed-property-spacing': ['error'],
|
|
223
|
-
'dot-location': ['error', 'property'],
|
|
224
|
-
'eol-last': ['error'],
|
|
225
|
-
'function-call-argument-newline': ['error', 'consistent'],
|
|
226
|
-
'function-paren-newline': ['error', 'consistent'],
|
|
227
|
-
'generator-star-spacing': ['error', 'both'],
|
|
228
|
-
'implicit-arrow-linebreak': 'off',
|
|
229
|
-
'jsx-quotes': ['error'],
|
|
230
205
|
'line-comment-position': 'off',
|
|
231
|
-
'linebreak-style': ['error'],
|
|
232
|
-
'max-len': ['error', { code: 100 }],
|
|
233
|
-
'max-statements-per-line': ['error'],
|
|
234
|
-
'multiline-ternary': 'off',
|
|
235
|
-
'new-parens': ['error'],
|
|
236
|
-
'newline-per-chained-call': 'off',
|
|
237
|
-
'no-mixed-spaces-and-tabs': 'off',
|
|
238
|
-
'no-multi-spaces': 'off',
|
|
239
|
-
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
240
|
-
'no-tabs': ['error'],
|
|
241
|
-
'no-trailing-spaces': ['error'],
|
|
242
|
-
'no-whitespace-before-property': ['error'],
|
|
243
|
-
'nonblock-statement-body-position': 'off',
|
|
244
|
-
'object-curly-newline': 'off',
|
|
245
|
-
'object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }],
|
|
246
|
-
'operator-linebreak': ['error', 'after'],
|
|
247
|
-
'padded-blocks': ['error', 'never'],
|
|
248
|
-
'rest-spread-spacing': ['error'],
|
|
249
|
-
'semi-spacing': ['error'],
|
|
250
|
-
'semi-style': ['error'],
|
|
251
|
-
'space-in-parens': ['error'],
|
|
252
|
-
'space-unary-ops': ['error'],
|
|
253
|
-
'switch-colon-spacing': ['error', { after: true, before: false }],
|
|
254
|
-
'template-curly-spacing': ['error'],
|
|
255
|
-
'template-tag-spacing': 'off',
|
|
256
206
|
'unicode-bom': ['error'],
|
|
257
|
-
'wrap-iife': 'off',
|
|
258
|
-
'wrap-regex': 'off',
|
|
259
|
-
'yield-star-spacing': ['error', 'both'],
|
|
260
207
|
},
|
|
261
208
|
[exports.HYBRID]: {
|
|
262
209
|
'no-dupe-class-members': jsts(['error'], 'off'),
|
|
@@ -267,9 +214,9 @@ exports.RULES = {
|
|
|
267
214
|
'default-param-last': 'off',
|
|
268
215
|
'dot-notation': ['error'],
|
|
269
216
|
'init-declarations': 'off',
|
|
217
|
+
'max-params': 'off',
|
|
270
218
|
'no-array-constructor': ['error'],
|
|
271
219
|
'no-empty-function': 'off',
|
|
272
|
-
'no-extra-semi': ['error'],
|
|
273
220
|
'no-implied-eval': 'off',
|
|
274
221
|
'no-invalid-this': 'off',
|
|
275
222
|
'no-loop-func': ['error'],
|
|
@@ -282,56 +229,6 @@ exports.RULES = {
|
|
|
282
229
|
'no-useless-constructor': ['error'],
|
|
283
230
|
'prefer-destructuring': beforeJSOrElse(2015, 'off', ['error']),
|
|
284
231
|
'require-await': ['error'],
|
|
285
|
-
'block-spacing': ['error'],
|
|
286
|
-
'brace-style': 'off',
|
|
287
|
-
'comma-dangle': ['error', 'always-multiline'],
|
|
288
|
-
'comma-spacing': ['error'],
|
|
289
|
-
'func-call-spacing': 'off',
|
|
290
|
-
'indent': 'off',
|
|
291
|
-
'key-spacing': 'off',
|
|
292
|
-
'keyword-spacing': ['error'],
|
|
293
|
-
'lines-around-comment': jsts([
|
|
294
|
-
'error',
|
|
295
|
-
{
|
|
296
|
-
allowBlockStart: true,
|
|
297
|
-
allowObjectStart: true,
|
|
298
|
-
applyDefaultIgnorePatterns: false,
|
|
299
|
-
},
|
|
300
|
-
], [
|
|
301
|
-
'error',
|
|
302
|
-
{
|
|
303
|
-
allowBlockStart: true,
|
|
304
|
-
allowEnumStart: true,
|
|
305
|
-
allowInterfaceStart: true,
|
|
306
|
-
allowModuleStart: true,
|
|
307
|
-
allowObjectStart: true,
|
|
308
|
-
allowTypeStart: true,
|
|
309
|
-
applyDefaultIgnorePatterns: false,
|
|
310
|
-
},
|
|
311
|
-
]),
|
|
312
|
-
'lines-between-class-members': 'off',
|
|
313
|
-
'no-extra-parens': ['error'],
|
|
314
|
-
'object-curly-spacing': ['error', 'always'],
|
|
315
|
-
'padding-line-between-statements': [
|
|
316
|
-
'error',
|
|
317
|
-
{
|
|
318
|
-
blankLine: 'always',
|
|
319
|
-
prev: '*',
|
|
320
|
-
next: ['class', 'directive', 'export', 'function', 'import'],
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
blankLine: 'always',
|
|
324
|
-
prev: ['class', 'directive', 'export', 'function', 'import'],
|
|
325
|
-
next: '*',
|
|
326
|
-
},
|
|
327
|
-
{ blankLine: 'any', prev: 'export', next: 'export' },
|
|
328
|
-
{ blankLine: 'any', prev: 'import', next: 'import' },
|
|
329
|
-
],
|
|
330
|
-
'quotes': ['error', 'single'],
|
|
331
|
-
'semi': ['error'],
|
|
332
|
-
'space-before-blocks': ['error'],
|
|
333
|
-
'space-before-function-paren': 'off',
|
|
334
|
-
'space-infix-ops': jsts(['error'], 'off'),
|
|
335
232
|
},
|
|
336
233
|
'@typescript-eslint/eslint-plugin': {
|
|
337
234
|
[exports.FOR_LANG]: 'ts',
|
|
@@ -362,6 +259,8 @@ exports.RULES = {
|
|
|
362
259
|
'no-unsafe-declaration-merging': 'off',
|
|
363
260
|
'no-unsafe-member-access': ['error'],
|
|
364
261
|
'no-unsafe-return': ['error'],
|
|
262
|
+
'no-unsafe-unary-minus': 'off',
|
|
263
|
+
'no-useless-template-literals': ['error'],
|
|
365
264
|
'no-var-requires': ['error'],
|
|
366
265
|
'parameter-properties': ['error', { prefer: 'parameter-property' }],
|
|
367
266
|
'prefer-reduce-type-parameter': ['error'],
|
|
@@ -389,6 +288,7 @@ exports.RULES = {
|
|
|
389
288
|
'no-dynamic-delete': 'off',
|
|
390
289
|
'no-empty-interface': ['error', { allowSingleExtends: true }],
|
|
391
290
|
'no-explicit-any': 'off',
|
|
291
|
+
'no-extra-semi': 'off',
|
|
392
292
|
'no-extraneous-class': ['error', { allowConstructorOnly: true }],
|
|
393
293
|
'no-inferrable-types': ['error'],
|
|
394
294
|
'no-meaningless-void-operator': ['error', { checkNever: true }],
|
|
@@ -425,8 +325,25 @@ exports.RULES = {
|
|
|
425
325
|
'triple-slash-reference': ['error', { lib: 'never' }],
|
|
426
326
|
'typedef': ['error'],
|
|
427
327
|
'unified-signatures': ['error', { ignoreDifferentlyNamedParameters: true }],
|
|
428
|
-
'
|
|
429
|
-
'
|
|
328
|
+
'block-spacing': 'off',
|
|
329
|
+
'brace-style': 'off',
|
|
330
|
+
'comma-dangle': 'off',
|
|
331
|
+
'comma-spacing': 'off',
|
|
332
|
+
'func-call-spacing': 'off',
|
|
333
|
+
'indent': 'off',
|
|
334
|
+
'key-spacing': 'off',
|
|
335
|
+
'keyword-spacing': 'off',
|
|
336
|
+
'lines-around-comment': 'off',
|
|
337
|
+
'lines-between-class-members': 'off',
|
|
338
|
+
'member-delimiter-style': 'off',
|
|
339
|
+
'no-extra-parens': 'off',
|
|
340
|
+
'padding-line-between-statements': 'off',
|
|
341
|
+
'quotes': 'off',
|
|
342
|
+
'semi': 'off',
|
|
343
|
+
'space-before-blocks': 'off',
|
|
344
|
+
'space-before-function-paren': 'off',
|
|
345
|
+
'space-infix-ops': 'off',
|
|
346
|
+
'type-annotation-spacing': 'off',
|
|
430
347
|
},
|
|
431
348
|
'@origin-1/eslint-plugin': {
|
|
432
349
|
'no-extra-new': ['error'],
|
|
@@ -437,6 +354,135 @@ exports.RULES = {
|
|
|
437
354
|
'no-spaces-in-tagged-template': ['error'],
|
|
438
355
|
'property-colon-spacing': ['error'],
|
|
439
356
|
},
|
|
357
|
+
'@stylistic/eslint-plugin': {
|
|
358
|
+
'array-bracket-newline': 'off',
|
|
359
|
+
'array-bracket-spacing': ['error'],
|
|
360
|
+
'array-element-newline': 'off',
|
|
361
|
+
'arrow-parens': ['error', 'as-needed'],
|
|
362
|
+
'arrow-spacing': ['error'],
|
|
363
|
+
'block-spacing': ['error'],
|
|
364
|
+
'brace-style': 'off',
|
|
365
|
+
'comma-dangle': ['error', 'always-multiline'],
|
|
366
|
+
'comma-spacing': ['error'],
|
|
367
|
+
'comma-style': ['error', 'last', { exceptions: { ArrayExpression: true } }],
|
|
368
|
+
'computed-property-spacing': ['error'],
|
|
369
|
+
'dot-location': ['error', 'property'],
|
|
370
|
+
'eol-last': ['error'],
|
|
371
|
+
'func-call-spacing': 'off',
|
|
372
|
+
'function-call-argument-newline': ['error', 'consistent'],
|
|
373
|
+
'function-call-spacing': 'off',
|
|
374
|
+
'function-paren-newline': ['error', 'consistent'],
|
|
375
|
+
'generator-star-spacing': ['error', 'both'],
|
|
376
|
+
'implicit-arrow-linebreak': 'off',
|
|
377
|
+
'indent': 'off',
|
|
378
|
+
'indent-binary-ops': 'off',
|
|
379
|
+
'jsx-child-element-spacing': 'off',
|
|
380
|
+
'jsx-closing-bracket-location': 'off',
|
|
381
|
+
'jsx-closing-tag-location': ['error'],
|
|
382
|
+
'jsx-curly-brace-presence': 'off',
|
|
383
|
+
'jsx-curly-newline': 'off',
|
|
384
|
+
'jsx-curly-spacing': 'off',
|
|
385
|
+
'jsx-equals-spacing': ['error'],
|
|
386
|
+
'jsx-first-prop-new-line': 'off',
|
|
387
|
+
'jsx-indent': 'off',
|
|
388
|
+
'jsx-indent-props': 'off',
|
|
389
|
+
'jsx-max-props-per-line': 'off',
|
|
390
|
+
'jsx-newline': 'off',
|
|
391
|
+
'jsx-one-expression-per-line': 'off',
|
|
392
|
+
'jsx-props-no-multi-spaces': 'off',
|
|
393
|
+
'jsx-quotes': ['error'],
|
|
394
|
+
'jsx-self-closing-comp': 'off',
|
|
395
|
+
'jsx-sort-props': 'off',
|
|
396
|
+
'jsx-tag-spacing': ['error', { beforeClosing: 'allow', beforeSelfClosing: 'always' }],
|
|
397
|
+
'jsx-wrap-multilines': 'off',
|
|
398
|
+
'key-spacing': 'off',
|
|
399
|
+
'keyword-spacing': ['error'],
|
|
400
|
+
'linebreak-style': ['error'],
|
|
401
|
+
'lines-around-comment': jsts([
|
|
402
|
+
'error',
|
|
403
|
+
{
|
|
404
|
+
allowBlockStart: true,
|
|
405
|
+
allowObjectStart: true,
|
|
406
|
+
applyDefaultIgnorePatterns: false,
|
|
407
|
+
},
|
|
408
|
+
], [
|
|
409
|
+
'error',
|
|
410
|
+
{
|
|
411
|
+
allowBlockStart: true,
|
|
412
|
+
allowEnumStart: true,
|
|
413
|
+
allowInterfaceStart: true,
|
|
414
|
+
allowModuleStart: true,
|
|
415
|
+
allowObjectStart: true,
|
|
416
|
+
allowTypeStart: true,
|
|
417
|
+
applyDefaultIgnorePatterns: false,
|
|
418
|
+
},
|
|
419
|
+
]),
|
|
420
|
+
'lines-between-class-members': 'off',
|
|
421
|
+
'max-len': ['error', { code: 100 }],
|
|
422
|
+
'max-statements-per-line': ['error'],
|
|
423
|
+
'member-delimiter-style': ['error', { singleline: { requireLast: true } }],
|
|
424
|
+
'multiline-ternary': 'off',
|
|
425
|
+
'new-parens': ['error'],
|
|
426
|
+
'newline-per-chained-call': 'off',
|
|
427
|
+
'no-confusing-arrow': 'off',
|
|
428
|
+
'no-extra-parens': ['error'],
|
|
429
|
+
'no-extra-semi': ['error'],
|
|
430
|
+
'no-floating-decimal': ['error'],
|
|
431
|
+
'no-mixed-operators': 'off',
|
|
432
|
+
'no-mixed-spaces-and-tabs': 'off',
|
|
433
|
+
'no-multi-spaces': 'off',
|
|
434
|
+
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
435
|
+
'no-tabs': ['error'],
|
|
436
|
+
'no-trailing-spaces': ['error'],
|
|
437
|
+
'no-whitespace-before-property': ['error'],
|
|
438
|
+
'nonblock-statement-body-position': 'off',
|
|
439
|
+
'object-curly-newline': 'off',
|
|
440
|
+
'object-curly-spacing': ['error', 'always'],
|
|
441
|
+
'object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }],
|
|
442
|
+
'one-var-declaration-per-line': ['error'],
|
|
443
|
+
'operator-linebreak': ['error', 'after'],
|
|
444
|
+
'padded-blocks': ['error', 'never'],
|
|
445
|
+
'padding-line-between-statements': [
|
|
446
|
+
'error',
|
|
447
|
+
{
|
|
448
|
+
blankLine: 'always',
|
|
449
|
+
prev: '*',
|
|
450
|
+
next: ['class', 'directive', 'export', 'function', 'import'],
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
blankLine: 'always',
|
|
454
|
+
prev: ['class', 'directive', 'export', 'function', 'import'],
|
|
455
|
+
next: '*',
|
|
456
|
+
},
|
|
457
|
+
{ blankLine: 'any', prev: 'export', next: 'export' },
|
|
458
|
+
{ blankLine: 'any', prev: 'import', next: 'import' },
|
|
459
|
+
],
|
|
460
|
+
'quote-props': 'off',
|
|
461
|
+
'quotes': ['error', 'single'],
|
|
462
|
+
'rest-spread-spacing': ['error'],
|
|
463
|
+
'semi': ['error'],
|
|
464
|
+
'semi-spacing': ['error'],
|
|
465
|
+
'semi-style': ['error'],
|
|
466
|
+
'space-before-blocks': ['error'],
|
|
467
|
+
'space-before-function-paren': 'off',
|
|
468
|
+
'space-in-parens': ['error'],
|
|
469
|
+
'space-infix-ops': jsts(['error'], 'off'),
|
|
470
|
+
'space-unary-ops': ['error'],
|
|
471
|
+
'spaced-comment': [
|
|
472
|
+
'error',
|
|
473
|
+
'always',
|
|
474
|
+
{ block: { exceptions: ['*'] }, line: { exceptions: ['/'], markers: ['/'] } },
|
|
475
|
+
],
|
|
476
|
+
'switch-colon-spacing': ['error', { after: true, before: false }],
|
|
477
|
+
'template-curly-spacing': ['error'],
|
|
478
|
+
'template-tag-spacing': 'off',
|
|
479
|
+
'type-annotation-spacing': ['error'],
|
|
480
|
+
'type-generic-spacing': 'off',
|
|
481
|
+
'type-named-tuple-spacing': 'off',
|
|
482
|
+
'wrap-iife': 'off',
|
|
483
|
+
'wrap-regex': 'off',
|
|
484
|
+
'yield-star-spacing': ['error', 'both'],
|
|
485
|
+
},
|
|
440
486
|
'eslint-plugin-n': {
|
|
441
487
|
'no-callback-literal': 'off',
|
|
442
488
|
'no-deprecated-api': ['error'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@origin-1/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "ESLint configuration generator with Origin₁ presets",
|
|
5
5
|
"homepage": "https://github.com/origin-1/eslint-config#readme",
|
|
6
6
|
"license": "ISC",
|
|
@@ -15,9 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@origin-1/eslint-plugin": ">=0.14",
|
|
18
|
-
"@
|
|
19
|
-
"@typescript-eslint/
|
|
20
|
-
"eslint": "^
|
|
18
|
+
"@stylistic/eslint-plugin": "^1.5",
|
|
19
|
+
"@typescript-eslint/eslint-plugin": "^6.15",
|
|
20
|
+
"@typescript-eslint/parser": "^6.15",
|
|
21
|
+
"eslint": "^8.56",
|
|
21
22
|
"eslint-plugin-n": "16"
|
|
22
23
|
},
|
|
23
24
|
"engines": {
|