@cubejs-backend/linter 1.7.36 → 1.7.37

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.
@@ -0,0 +1,703 @@
1
+ // GENERATED PORT -- do not hand-edit. This is the airbnb-base + typescript-eslint rule
2
+ // set that @cubejs-backend/linter used to export as an ESLint config, mapped 1:1 onto
3
+ // oxlint. Deliberate departures from it live in .oxlintrc.json, which extends this file.
4
+ //
5
+ // Rules with no oxlint or @stylistic equivalent, deliberately not carried over:
6
+ //
7
+ // camelcase, no-undef-init, lines-around-directive, strict
8
+ // no-restricted-syntax -- the ForInStatement ban; guard-for-in, no-labels and
9
+ // no-with (all still enabled) cover the rest of it
10
+ // consistent-return, dot-notation, no-return-await
11
+ // -- exist only as typescript/* rules needing options.typeAware
12
+ // import/order, import/no-extraneous-dependencies, import/no-useless-path-segments
13
+ //
14
+ // One rule is remapped rather than dropped: the ESLint config set `no-shadow: 'off'` plus
15
+ // `@typescript-eslint/no-shadow: ['error', { ignoreTypeValueShadow: true }]` in its *.ts
16
+ // override, and oxlint has no typescript/no-shadow -- configuring that key just routes to
17
+ // core no-shadow. Core no-shadow is used unqualified here because it already behaves the
18
+ // way ignoreTypeValueShadow asked for. A/B against eslint 8.57.1 + typescript-eslint
19
+ // 8.46.0 agrees on every shape tried: both ignore a type shadowing a value (`type Foo` +
20
+ // `const Foo`, a local `type X` or `<X>` type parameter over an outer `const X`, a
21
+ // function-type parameter name over an outer value) and both report a type shadowing a
22
+ // type (`<T>` or a local `interface T` over an outer `type T`) and an enum member
23
+ // shadowing an imported binding, at identical positions.
24
+ // no-dupe-args, no-octal, no-octal-escape
25
+ // -- parse errors under ESM/strict, so unreachable in practice
26
+ {
27
+ "plugins": [
28
+ "eslint",
29
+ "import",
30
+ "node",
31
+ "typescript",
32
+ "unicorn"
33
+ ],
34
+ "jsPlugins": [
35
+ "@stylistic/eslint-plugin"
36
+ ],
37
+ "categories": {
38
+ "correctness": "off"
39
+ },
40
+ "env": {
41
+ "node": true,
42
+ "es6": true
43
+ },
44
+ "rules": {
45
+ "@stylistic/array-bracket-spacing": [
46
+ "error",
47
+ "never"
48
+ ],
49
+ "@stylistic/arrow-spacing": [
50
+ "error",
51
+ {
52
+ "before": true,
53
+ "after": true
54
+ }
55
+ ],
56
+ "@stylistic/block-spacing": [
57
+ "error",
58
+ "always"
59
+ ],
60
+ "@stylistic/brace-style": [
61
+ "error",
62
+ "1tbs",
63
+ {
64
+ "allowSingleLine": true
65
+ }
66
+ ],
67
+ "@stylistic/comma-spacing": [
68
+ "error",
69
+ {
70
+ "before": false,
71
+ "after": true
72
+ }
73
+ ],
74
+ "@stylistic/comma-style": [
75
+ "error",
76
+ "last",
77
+ {
78
+ "exceptions": {
79
+ "ArrayExpression": false,
80
+ "ArrayPattern": false,
81
+ "ArrowFunctionExpression": false,
82
+ "CallExpression": false,
83
+ "FunctionDeclaration": false,
84
+ "FunctionExpression": false,
85
+ "ImportDeclaration": false,
86
+ "ObjectExpression": false,
87
+ "ObjectPattern": false,
88
+ "VariableDeclaration": false,
89
+ "NewExpression": false
90
+ }
91
+ }
92
+ ],
93
+ "@stylistic/computed-property-spacing": [
94
+ "error",
95
+ "never"
96
+ ],
97
+ "@stylistic/dot-location": [
98
+ "error",
99
+ "property"
100
+ ],
101
+ "@stylistic/eol-last": [
102
+ "error",
103
+ "always"
104
+ ],
105
+ "@stylistic/function-call-spacing": [
106
+ "error",
107
+ "never"
108
+ ],
109
+ "@stylistic/function-paren-newline": [
110
+ "error",
111
+ "consistent"
112
+ ],
113
+ "@stylistic/generator-star-spacing": [
114
+ "error",
115
+ {
116
+ "before": false,
117
+ "after": true
118
+ }
119
+ ],
120
+ "@stylistic/implicit-arrow-linebreak": [
121
+ "error",
122
+ "beside"
123
+ ],
124
+ "@stylistic/indent": [
125
+ "error",
126
+ 2,
127
+ {
128
+ "SwitchCase": 1,
129
+ "VariableDeclarator": 1,
130
+ "outerIIFEBody": 1,
131
+ "FunctionDeclaration": {
132
+ "parameters": 1,
133
+ "body": 1
134
+ },
135
+ "FunctionExpression": {
136
+ "parameters": 1,
137
+ "body": 1
138
+ },
139
+ "CallExpression": {
140
+ "arguments": 1
141
+ },
142
+ "ArrayExpression": 1,
143
+ "ObjectExpression": 1,
144
+ "ImportDeclaration": 1,
145
+ "flatTernaryExpressions": false,
146
+ "ignoredNodes": [
147
+ "JSXElement",
148
+ "JSXElement > *",
149
+ "JSXAttribute",
150
+ "JSXIdentifier",
151
+ "JSXNamespacedName",
152
+ "JSXMemberExpression",
153
+ "JSXSpreadAttribute",
154
+ "JSXExpressionContainer",
155
+ "JSXOpeningElement",
156
+ "JSXClosingElement",
157
+ "JSXFragment",
158
+ "JSXOpeningFragment",
159
+ "JSXClosingFragment",
160
+ "JSXText",
161
+ "JSXEmptyExpression",
162
+ "JSXSpreadChild"
163
+ ],
164
+ "ignoreComments": false,
165
+ "offsetTernaryExpressions": false
166
+ }
167
+ ],
168
+ "@stylistic/key-spacing": [
169
+ "error",
170
+ {
171
+ "beforeColon": false,
172
+ "afterColon": true
173
+ }
174
+ ],
175
+ "@stylistic/keyword-spacing": [
176
+ "error",
177
+ {
178
+ "before": true,
179
+ "after": true,
180
+ "overrides": {
181
+ "return": {
182
+ "after": true
183
+ },
184
+ "throw": {
185
+ "after": true
186
+ },
187
+ "case": {
188
+ "after": true
189
+ }
190
+ }
191
+ }
192
+ ],
193
+ "@stylistic/linebreak-style": [
194
+ "error",
195
+ "unix"
196
+ ],
197
+ "@stylistic/lines-between-class-members": [
198
+ "error",
199
+ "always",
200
+ {
201
+ "exceptAfterSingleLine": false
202
+ }
203
+ ],
204
+ "@stylistic/new-parens": "error",
205
+ "@stylistic/newline-per-chained-call": [
206
+ "error",
207
+ {
208
+ "ignoreChainWithDepth": 4
209
+ }
210
+ ],
211
+ "@stylistic/no-confusing-arrow": [
212
+ "error",
213
+ {
214
+ "allowParens": true,
215
+ "onlyOneSimpleParam": false
216
+ }
217
+ ],
218
+ "@stylistic/no-extra-semi": "error",
219
+ "@stylistic/no-floating-decimal": "error",
220
+ "@stylistic/no-mixed-spaces-and-tabs": "error",
221
+ "@stylistic/no-multi-spaces": [
222
+ "error",
223
+ {
224
+ "ignoreEOLComments": false
225
+ }
226
+ ],
227
+ "@stylistic/no-multiple-empty-lines": [
228
+ "error",
229
+ {
230
+ "max": 1,
231
+ "maxBOF": 0,
232
+ "maxEOF": 0
233
+ }
234
+ ],
235
+ "@stylistic/no-tabs": "error",
236
+ "@stylistic/no-trailing-spaces": [
237
+ "warn",
238
+ {
239
+ "skipBlankLines": true,
240
+ "ignoreComments": false
241
+ }
242
+ ],
243
+ "@stylistic/no-whitespace-before-property": "error",
244
+ "@stylistic/nonblock-statement-body-position": [
245
+ "error",
246
+ "beside",
247
+ {
248
+ "overrides": {}
249
+ }
250
+ ],
251
+ "@stylistic/object-curly-spacing": [
252
+ "error",
253
+ "always"
254
+ ],
255
+ "@stylistic/object-property-newline": [
256
+ "error",
257
+ {
258
+ "allowAllPropertiesOnSameLine": true
259
+ }
260
+ ],
261
+ "@stylistic/one-var-declaration-per-line": [
262
+ "error",
263
+ "always"
264
+ ],
265
+ "@stylistic/padded-blocks": [
266
+ "error",
267
+ {
268
+ "blocks": "never",
269
+ "classes": "never",
270
+ "switches": "never"
271
+ },
272
+ {
273
+ "allowSingleLineBlocks": true
274
+ }
275
+ ],
276
+ "@stylistic/quote-props": [
277
+ "error",
278
+ "as-needed",
279
+ {
280
+ "keywords": false,
281
+ "unnecessary": true,
282
+ "numbers": false
283
+ }
284
+ ],
285
+ "@stylistic/quotes": [
286
+ "warn",
287
+ "single"
288
+ ],
289
+ "@stylistic/rest-spread-spacing": [
290
+ "error",
291
+ "never"
292
+ ],
293
+ "@stylistic/semi": [
294
+ "error",
295
+ "always"
296
+ ],
297
+ "@stylistic/semi-spacing": [
298
+ "error",
299
+ {
300
+ "before": false,
301
+ "after": true
302
+ }
303
+ ],
304
+ "@stylistic/semi-style": [
305
+ "error",
306
+ "last"
307
+ ],
308
+ "@stylistic/space-before-blocks": "error",
309
+ "@stylistic/space-before-function-paren": [
310
+ "error",
311
+ {
312
+ "anonymous": "always",
313
+ "named": "never",
314
+ "asyncArrow": "always"
315
+ }
316
+ ],
317
+ "@stylistic/space-in-parens": [
318
+ "error",
319
+ "never"
320
+ ],
321
+ "@stylistic/space-infix-ops": "error",
322
+ "@stylistic/space-unary-ops": [
323
+ "error",
324
+ {
325
+ "words": true,
326
+ "nonwords": false,
327
+ "overrides": {}
328
+ }
329
+ ],
330
+ "@stylistic/spaced-comment": [
331
+ "error",
332
+ "always",
333
+ {
334
+ "line": {
335
+ "exceptions": [
336
+ "-",
337
+ "+"
338
+ ],
339
+ "markers": [
340
+ "=",
341
+ "!",
342
+ "/"
343
+ ]
344
+ },
345
+ "block": {
346
+ "exceptions": [
347
+ "-",
348
+ "+"
349
+ ],
350
+ "markers": [
351
+ "=",
352
+ "!",
353
+ ":",
354
+ "::"
355
+ ],
356
+ "balanced": true
357
+ }
358
+ }
359
+ ],
360
+ "@stylistic/switch-colon-spacing": [
361
+ "error",
362
+ {
363
+ "after": true,
364
+ "before": false
365
+ }
366
+ ],
367
+ "@stylistic/template-curly-spacing": "error",
368
+ "@stylistic/template-tag-spacing": [
369
+ "error",
370
+ "never"
371
+ ],
372
+ "@stylistic/type-annotation-spacing": "error",
373
+ "@stylistic/wrap-iife": [
374
+ "error",
375
+ "outside",
376
+ {
377
+ "functionPrototypeMethods": false
378
+ }
379
+ ],
380
+ "@stylistic/yield-star-spacing": [
381
+ "error",
382
+ "after"
383
+ ],
384
+ "array-callback-return": [
385
+ "error",
386
+ {
387
+ "allowImplicit": true,
388
+ "checkForEach": false,
389
+ "allowVoid": false
390
+ }
391
+ ],
392
+ "arrow-body-style": [
393
+ "error",
394
+ "as-needed",
395
+ {
396
+ "requireReturnForObjectLiteral": false
397
+ }
398
+ ],
399
+ "block-scoped-var": "error",
400
+ "constructor-super": "error",
401
+ "curly": [
402
+ "error",
403
+ "multi-line"
404
+ ],
405
+ "default-case": [
406
+ "error",
407
+ {
408
+ "commentPattern": "^no default$"
409
+ }
410
+ ],
411
+ "eqeqeq": [
412
+ "error",
413
+ "always",
414
+ {
415
+ "null": "ignore"
416
+ }
417
+ ],
418
+ "for-direction": "error",
419
+ "func-names": "warn",
420
+ "getter-return": [
421
+ "error",
422
+ {
423
+ "allowImplicit": true
424
+ }
425
+ ],
426
+ "guard-for-in": "error",
427
+ "import/export": "error",
428
+ "import/first": "error",
429
+ "import/named": "error",
430
+ "import/newline-after-import": "error",
431
+ "import/no-absolute-path": "error",
432
+ "import/no-amd": "error",
433
+ "import/no-cycle": [
434
+ "error",
435
+ {
436
+ "ignoreExternal": false,
437
+ "allowUnsafeDynamicCyclicDependency": false,
438
+ "disableScc": false
439
+ }
440
+ ],
441
+ "import/no-duplicates": "error",
442
+ "import/no-dynamic-require": "error",
443
+ "import/no-mutable-exports": "error",
444
+ "import/no-named-as-default": "error",
445
+ "import/no-named-as-default-member": "error",
446
+ "import/no-named-default": "error",
447
+ "import/no-self-import": "error",
448
+ "import/no-webpack-loader-syntax": "error",
449
+ "new-cap": [
450
+ "error",
451
+ {
452
+ "newIsCap": true,
453
+ "newIsCapExceptions": [],
454
+ "capIsNew": false,
455
+ "capIsNewExceptions": [
456
+ "Immutable.Map",
457
+ "Immutable.Set",
458
+ "Immutable.List"
459
+ ],
460
+ "properties": true
461
+ }
462
+ ],
463
+ "no-alert": "warn",
464
+ "no-array-constructor": "error",
465
+ "no-async-promise-executor": "error",
466
+ "no-bitwise": "error",
467
+ "no-caller": "error",
468
+ "no-case-declarations": "error",
469
+ "no-class-assign": "error",
470
+ "no-compare-neg-zero": "error",
471
+ "no-cond-assign": [
472
+ "error",
473
+ "always"
474
+ ],
475
+ "no-const-assign": "error",
476
+ "no-constant-condition": "warn",
477
+ "no-continue": "error",
478
+ "no-control-regex": "error",
479
+ "no-debugger": "error",
480
+ "no-delete-var": "error",
481
+ "no-dupe-class-members": "error",
482
+ "no-dupe-keys": "error",
483
+ "no-duplicate-case": "error",
484
+ "no-empty": "error",
485
+ "no-empty-character-class": "error",
486
+ "no-empty-function": "error",
487
+ "no-empty-pattern": "error",
488
+ "no-eval": "error",
489
+ "no-ex-assign": "error",
490
+ "no-extend-native": "error",
491
+ "no-extra-bind": "error",
492
+ "no-extra-boolean-cast": "error",
493
+ "no-extra-label": "error",
494
+ "no-fallthrough": "error",
495
+ "no-func-assign": "error",
496
+ "no-global-assign": [
497
+ "error",
498
+ {
499
+ "exceptions": []
500
+ }
501
+ ],
502
+ "no-implied-eval": "error",
503
+ "no-inner-declarations": "error",
504
+ "no-invalid-regexp": "error",
505
+ "no-irregular-whitespace": "error",
506
+ "no-iterator": "error",
507
+ "no-label-var": "error",
508
+ "no-labels": [
509
+ "error",
510
+ {
511
+ "allowLoop": false,
512
+ "allowSwitch": false
513
+ }
514
+ ],
515
+ "no-lone-blocks": "error",
516
+ "no-lonely-if": "error",
517
+ "no-loop-func": "error",
518
+ "no-misleading-character-class": "error",
519
+ "no-multi-assign": "error",
520
+ "no-multi-str": "error",
521
+ "no-nested-ternary": "error",
522
+ "no-new": "error",
523
+ "no-new-func": "error",
524
+ "no-new-native-nonconstructor": "error",
525
+ "no-new-wrappers": "error",
526
+ "no-obj-calls": "error",
527
+ "no-object-constructor": "error",
528
+ "no-proto": "error",
529
+ "no-redeclare": "error",
530
+ "no-regex-spaces": "error",
531
+ "no-restricted-globals": "error",
532
+ "no-restricted-properties": "error",
533
+ "no-return-assign": [
534
+ "error",
535
+ "always"
536
+ ],
537
+ "no-script-url": "error",
538
+ "no-self-assign": [
539
+ "error",
540
+ {
541
+ "props": true
542
+ }
543
+ ],
544
+ "no-self-compare": "error",
545
+ "no-sequences": "error",
546
+ "no-shadow": "error",
547
+ "no-shadow-restricted-names": "error",
548
+ "no-sparse-arrays": "error",
549
+ "no-template-curly-in-string": "error",
550
+ "no-this-before-super": "error",
551
+ "no-throw-literal": "error",
552
+ "no-undef": "error",
553
+ "no-unexpected-multiline": "error",
554
+ "no-unneeded-ternary": [
555
+ "error",
556
+ {
557
+ "defaultAssignment": false
558
+ }
559
+ ],
560
+ "no-unreachable": "error",
561
+ "no-unsafe-finally": "error",
562
+ "no-unsafe-negation": "error",
563
+ "no-unused-expressions": [
564
+ "error",
565
+ {
566
+ "allowShortCircuit": false,
567
+ "allowTernary": false,
568
+ "allowTaggedTemplates": false,
569
+ "enforceForJSX": false
570
+ }
571
+ ],
572
+ "no-unused-labels": "error",
573
+ "no-unused-vars": [
574
+ "warn",
575
+ {
576
+ "argsIgnorePattern": "^_.*",
577
+ "varsIgnorePattern": "^_.*"
578
+ }
579
+ ],
580
+ "no-use-before-define": [
581
+ "error",
582
+ {
583
+ "functions": true,
584
+ "classes": true,
585
+ "variables": true
586
+ }
587
+ ],
588
+ "no-useless-catch": "error",
589
+ "no-useless-computed-key": "error",
590
+ "no-useless-concat": "error",
591
+ "no-useless-escape": "error",
592
+ "no-useless-rename": [
593
+ "error",
594
+ {
595
+ "ignoreDestructuring": false,
596
+ "ignoreImport": false,
597
+ "ignoreExport": false
598
+ }
599
+ ],
600
+ "no-useless-return": "error",
601
+ "no-var": "error",
602
+ "no-void": "error",
603
+ "no-with": "error",
604
+ "node/global-require": "error",
605
+ "node/no-new-require": "error",
606
+ "node/no-path-concat": "error",
607
+ "object-shorthand": [
608
+ "error",
609
+ "always",
610
+ {
611
+ "ignoreConstructors": false,
612
+ "avoidQuotes": true
613
+ }
614
+ ],
615
+ "one-var": [
616
+ "error",
617
+ "never"
618
+ ],
619
+ "operator-assignment": [
620
+ "error",
621
+ "always"
622
+ ],
623
+ "prefer-arrow-callback": [
624
+ "error",
625
+ {
626
+ "allowNamedFunctions": false,
627
+ "allowUnboundThis": true
628
+ }
629
+ ],
630
+ "prefer-const": [
631
+ "error",
632
+ {
633
+ "destructuring": "any",
634
+ "ignoreReadBeforeAssign": true
635
+ }
636
+ ],
637
+ "prefer-destructuring": [
638
+ "error",
639
+ {
640
+ "VariableDeclarator": {
641
+ "array": false,
642
+ "object": true
643
+ },
644
+ "AssignmentExpression": {
645
+ "array": true,
646
+ "object": false
647
+ }
648
+ },
649
+ {
650
+ "enforceForRenamedProperties": false
651
+ }
652
+ ],
653
+ "prefer-numeric-literals": "error",
654
+ "prefer-rest-params": "error",
655
+ "prefer-spread": "error",
656
+ "prefer-template": "error",
657
+ "radix": "error",
658
+ "require-yield": "error",
659
+ "symbol-description": "error",
660
+ "typescript/prefer-as-const": "error",
661
+ "typescript/prefer-namespace-keyword": "error",
662
+ "typescript/triple-slash-reference": "error",
663
+ "unicode-bom": [
664
+ "error",
665
+ "never"
666
+ ],
667
+ "unicorn/no-new-buffer": "error",
668
+ "use-isnan": "error",
669
+ "valid-typeof": [
670
+ "error",
671
+ {
672
+ "requireStringLiterals": true
673
+ }
674
+ ],
675
+ "vars-on-top": "error",
676
+ "yoda": "error"
677
+ },
678
+ "overrides": [
679
+ {
680
+ "files": [
681
+ "**/*.ts",
682
+ "**/*.tsx"
683
+ ],
684
+ "rules": {
685
+ "constructor-super": "off",
686
+ "getter-return": "off",
687
+ "no-const-assign": "off",
688
+ "no-dupe-class-members": "off",
689
+ "no-dupe-keys": "off",
690
+ "no-func-assign": "off",
691
+ "no-new-native-nonconstructor": "off",
692
+ "no-obj-calls": "off",
693
+ "no-redeclare": "off",
694
+ "no-this-before-super": "off",
695
+ "no-undef": "off",
696
+ "no-unreachable": "off",
697
+ "no-unsafe-negation": "off",
698
+ "typescript/explicit-member-accessibility": "error",
699
+ "valid-typeof": "off"
700
+ }
701
+ }
702
+ ]
703
+ }