@gooddata/eslint-config 11.27.0-alpha.4 → 11.27.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.
@@ -1,2375 +0,0 @@
1
- {
2
- "plugins": [
3
- "header",
4
- "no-barrel-files",
5
- "import-x",
6
- "sonarjs",
7
- "import-esm",
8
- "cypress",
9
- "chai-friendly",
10
- "no-only-tests"
11
- ],
12
- "rules": {
13
- "constructor-super": "error",
14
- "for-direction": "error",
15
- "getter-return": "error",
16
- "no-async-promise-executor": "error",
17
- "no-case-declarations": "error",
18
- "no-class-assign": "error",
19
- "no-compare-neg-zero": "error",
20
- "no-cond-assign": "error",
21
- "no-const-assign": "error",
22
- "no-constant-binary-expression": "error",
23
- "no-constant-condition": "error",
24
- "no-control-regex": "error",
25
- "no-debugger": "error",
26
- "no-delete-var": 2,
27
- "no-dupe-args": "error",
28
- "no-dupe-class-members": "error",
29
- "no-dupe-else-if": "error",
30
- "no-dupe-keys": "error",
31
- "no-duplicate-case": "error",
32
- "no-empty": "error",
33
- "no-empty-character-class": "error",
34
- "no-empty-pattern": "error",
35
- "no-empty-static-block": "error",
36
- "no-ex-assign": "error",
37
- "no-fallthrough": "error",
38
- "no-func-assign": "error",
39
- "no-global-assign": "error",
40
- "no-import-assign": "error",
41
- "no-invalid-regexp": "error",
42
- "no-irregular-whitespace": "error",
43
- "no-loss-of-precision": "error",
44
- "no-misleading-character-class": "error",
45
- "no-new-native-nonconstructor": "error",
46
- "no-nonoctal-decimal-escape": "error",
47
- "no-obj-calls": "error",
48
- "no-octal": "error",
49
- "no-prototype-builtins": "error",
50
- "no-redeclare": "error",
51
- "no-regex-spaces": "error",
52
- "no-self-assign": "error",
53
- "no-setter-return": "error",
54
- "no-shadow-restricted-names": "error",
55
- "no-sparse-arrays": "error",
56
- "no-this-before-super": "error",
57
- "no-undef": "error",
58
- "no-unreachable": "error",
59
- "no-unsafe-finally": "error",
60
- "no-unsafe-negation": "error",
61
- "no-unsafe-optional-chaining": "error",
62
- "no-unused-labels": "error",
63
- "no-unused-private-class-members": "error",
64
- "no-unused-vars": "error",
65
- "no-useless-backreference": "error",
66
- "no-useless-catch": "error",
67
- "no-with": "error",
68
- "require-yield": "error",
69
- "use-isnan": "error",
70
- "valid-typeof": "error",
71
- "no-restricted-imports": [
72
- "error",
73
- {
74
- "paths": [
75
- {
76
- "name": "react",
77
- "importNames": [
78
- "default"
79
- ],
80
- "message": "Default import from React is not allowed. Use named imports instead."
81
- },
82
- {
83
- "name": "react-dom",
84
- "importNames": [
85
- "default"
86
- ],
87
- "message": "Default import from React DOM is not allowed. Use named imports instead."
88
- },
89
- {
90
- "name": "@gooddata/sdk-ui-kit",
91
- "importNames": [
92
- "Icon"
93
- ],
94
- "message": "The Icon export cannot be tree-shaken, use {IconName}Icon imports instead."
95
- },
96
- {
97
- "name": "vitest",
98
- "importNames": [
99
- "test"
100
- ],
101
- "message": "Use 'it' instead of 'test' for consistency."
102
- }
103
- ],
104
- "patterns": [
105
- {
106
- "group": [
107
- "lodash-es"
108
- ],
109
- "importNames": [
110
- "get",
111
- "getOr"
112
- ],
113
- "message": "Please use the ?. and ?? operators instead."
114
- },
115
- {
116
- "group": [
117
- "lodash-es"
118
- ],
119
- "importNames": [
120
- "keys"
121
- ],
122
- "message": "Please use Object.keys() instead."
123
- },
124
- {
125
- "group": [
126
- "lodash-es"
127
- ],
128
- "importNames": [
129
- "values"
130
- ],
131
- "message": "Please use Object.values() instead."
132
- },
133
- {
134
- "group": [
135
- "lodash-es"
136
- ],
137
- "importNames": [
138
- "entries",
139
- "toPairs"
140
- ],
141
- "message": "Please use Object.entries() instead."
142
- },
143
- {
144
- "group": [
145
- "lodash-es"
146
- ],
147
- "importNames": [
148
- "map"
149
- ],
150
- "message": "Please use Array.prototype.map() instead."
151
- },
152
- {
153
- "group": [
154
- "lodash-es"
155
- ],
156
- "importNames": [
157
- "flatMap"
158
- ],
159
- "message": "Please use Array.prototype.flatMap() instead."
160
- },
161
- {
162
- "group": [
163
- "lodash-es"
164
- ],
165
- "importNames": [
166
- "filter"
167
- ],
168
- "message": "Please use Array.prototype.filter() instead."
169
- },
170
- {
171
- "group": [
172
- "lodash-es"
173
- ],
174
- "importNames": [
175
- "find"
176
- ],
177
- "message": "Please use Array.prototype.find() instead."
178
- },
179
- {
180
- "group": [
181
- "lodash-es"
182
- ],
183
- "importNames": [
184
- "findIndex"
185
- ],
186
- "message": "Please use Array.prototype.findIndex() instead."
187
- },
188
- {
189
- "group": [
190
- "lodash-es"
191
- ],
192
- "importNames": [
193
- "includes"
194
- ],
195
- "message": "Please use Array.prototype.includes() instead."
196
- },
197
- {
198
- "group": [
199
- "lodash-es"
200
- ],
201
- "importNames": [
202
- "some"
203
- ],
204
- "message": "Please use Array.prototype.some() instead."
205
- },
206
- {
207
- "group": [
208
- "lodash-es"
209
- ],
210
- "importNames": [
211
- "every"
212
- ],
213
- "message": "Please use Array.prototype.every() instead."
214
- },
215
- {
216
- "group": [
217
- "lodash-es"
218
- ],
219
- "importNames": [
220
- "concat"
221
- ],
222
- "message": "Please use Array.prototype.concat() or spread [...arr1, ...arr2] instead."
223
- },
224
- {
225
- "group": [
226
- "lodash-es"
227
- ],
228
- "importNames": [
229
- "reverse"
230
- ],
231
- "message": "Please use Array.prototype.reverse() instead."
232
- },
233
- {
234
- "group": [
235
- "lodash-es"
236
- ],
237
- "importNames": [
238
- "slice"
239
- ],
240
- "message": "Please use Array.prototype.slice() instead."
241
- },
242
- {
243
- "group": [
244
- "lodash-es"
245
- ],
246
- "importNames": [
247
- "indexOf"
248
- ],
249
- "message": "Please use Array.prototype.indexOf() instead."
250
- },
251
- {
252
- "group": [
253
- "lodash-es"
254
- ],
255
- "importNames": [
256
- "lastIndexOf"
257
- ],
258
- "message": "Please use Array.prototype.lastIndexOf() instead."
259
- },
260
- {
261
- "group": [
262
- "lodash-es"
263
- ],
264
- "importNames": [
265
- "fill"
266
- ],
267
- "message": "Please use Array.prototype.fill() instead."
268
- },
269
- {
270
- "group": [
271
- "lodash-es"
272
- ],
273
- "importNames": [
274
- "startsWith"
275
- ],
276
- "message": "Please use String.prototype.startsWith() instead."
277
- },
278
- {
279
- "group": [
280
- "lodash-es"
281
- ],
282
- "importNames": [
283
- "endsWith"
284
- ],
285
- "message": "Please use String.prototype.endsWith() instead."
286
- },
287
- {
288
- "group": [
289
- "lodash-es"
290
- ],
291
- "importNames": [
292
- "repeat"
293
- ],
294
- "message": "Please use String.prototype.repeat() instead."
295
- },
296
- {
297
- "group": [
298
- "lodash-es"
299
- ],
300
- "importNames": [
301
- "padStart"
302
- ],
303
- "message": "Please use String.prototype.padStart() instead."
304
- },
305
- {
306
- "group": [
307
- "lodash-es"
308
- ],
309
- "importNames": [
310
- "padEnd"
311
- ],
312
- "message": "Please use String.prototype.padEnd() instead."
313
- },
314
- {
315
- "group": [
316
- "lodash-es"
317
- ],
318
- "importNames": [
319
- "trim"
320
- ],
321
- "message": "Please use String.prototype.trim() instead."
322
- },
323
- {
324
- "group": [
325
- "lodash-es"
326
- ],
327
- "importNames": [
328
- "trimStart",
329
- "trimLeft"
330
- ],
331
- "message": "Please use String.prototype.trimStart() instead."
332
- },
333
- {
334
- "group": [
335
- "lodash-es"
336
- ],
337
- "importNames": [
338
- "trimEnd",
339
- "trimRight"
340
- ],
341
- "message": "Please use String.prototype.trimEnd() instead."
342
- },
343
- {
344
- "group": [
345
- "lodash-es"
346
- ],
347
- "importNames": [
348
- "toUpper"
349
- ],
350
- "message": "Please use String.prototype.toUpperCase() instead."
351
- },
352
- {
353
- "group": [
354
- "lodash-es"
355
- ],
356
- "importNames": [
357
- "toLower"
358
- ],
359
- "message": "Please use String.prototype.toLowerCase() instead."
360
- },
361
- {
362
- "group": [
363
- "lodash-es"
364
- ],
365
- "importNames": [
366
- "isArray"
367
- ],
368
- "message": "Please use Array.isArray() instead."
369
- },
370
- {
371
- "group": [
372
- "lodash-es"
373
- ],
374
- "importNames": [
375
- "isNaN"
376
- ],
377
- "message": "Please use Number.isNaN() instead."
378
- },
379
- {
380
- "group": [
381
- "lodash-es"
382
- ],
383
- "importNames": [
384
- "isFinite"
385
- ],
386
- "message": "Please use Number.isFinite() instead."
387
- },
388
- {
389
- "group": [
390
- "lodash-es"
391
- ],
392
- "importNames": [
393
- "isInteger"
394
- ],
395
- "message": "Please use Number.isInteger() instead."
396
- },
397
- {
398
- "group": [
399
- "lodash-es"
400
- ],
401
- "importNames": [
402
- "isNull"
403
- ],
404
- "message": "Please use value === null instead."
405
- },
406
- {
407
- "group": [
408
- "lodash-es"
409
- ],
410
- "importNames": [
411
- "isUndefined"
412
- ],
413
- "message": "Please use value === undefined instead."
414
- },
415
- {
416
- "group": [
417
- "lodash-es"
418
- ],
419
- "importNames": [
420
- "defaultTo"
421
- ],
422
- "message": "Please use value ?? defaultValue instead."
423
- },
424
- {
425
- "group": [
426
- "lodash-es"
427
- ],
428
- "importNames": [
429
- "assign"
430
- ],
431
- "message": "Please use Object.assign() or spread syntax {...obj} instead."
432
- },
433
- {
434
- "group": [
435
- "lodash-es"
436
- ],
437
- "importNames": [
438
- "flatten"
439
- ],
440
- "message": "Please use Array.prototype.flat() instead."
441
- },
442
- {
443
- "group": [
444
- "lodash-es"
445
- ],
446
- "importNames": [
447
- "flattenDeep"
448
- ],
449
- "message": "Please use Array.prototype.flat(Infinity) instead."
450
- },
451
- {
452
- "group": [
453
- "lodash-es"
454
- ],
455
- "importNames": [
456
- "isNil"
457
- ],
458
- "message": "Please use value === null || value === undefined instead."
459
- },
460
- {
461
- "group": [
462
- "lodash-es"
463
- ],
464
- "importNames": [
465
- "noop"
466
- ],
467
- "message": "Please use () => {} instead."
468
- },
469
- {
470
- "group": [
471
- "lodash-es"
472
- ],
473
- "importNames": [
474
- "identity"
475
- ],
476
- "message": "Please use x => x instead."
477
- },
478
- {
479
- "group": [
480
- "lodash-es"
481
- ],
482
- "importNames": [
483
- "first",
484
- "head"
485
- ],
486
- "message": "Please use Array.prototype.at(0) instead."
487
- },
488
- {
489
- "group": [
490
- "lodash-es"
491
- ],
492
- "importNames": [
493
- "last"
494
- ],
495
- "message": "Please use Array.prototype.at(-1) instead."
496
- },
497
- {
498
- "group": [
499
- "lodash-es"
500
- ],
501
- "importNames": [
502
- "forEach"
503
- ],
504
- "message": "Please use Array.prototype.forEach() instead."
505
- },
506
- {
507
- "group": [
508
- "lodash-es"
509
- ],
510
- "importNames": [
511
- "fromPairs"
512
- ],
513
- "message": "Please use Object.fromEntries() instead."
514
- },
515
- {
516
- "group": [
517
- "lodash-es"
518
- ],
519
- "importNames": [
520
- "join"
521
- ],
522
- "message": "Please use Array.prototype.join() instead."
523
- },
524
- {
525
- "group": [
526
- "lodash-es"
527
- ],
528
- "importNames": [
529
- "isDate"
530
- ],
531
- "message": "Please use val instanceof Date instead."
532
- },
533
- {
534
- "group": [
535
- "lodash-es"
536
- ],
537
- "importNames": [
538
- "isFunction"
539
- ],
540
- "message": "Please use typeof val === 'function' instead."
541
- },
542
- {
543
- "group": [
544
- "lodash-es"
545
- ],
546
- "importNames": [
547
- "isNumber"
548
- ],
549
- "message": "Please use typeof val === 'number' instead."
550
- },
551
- {
552
- "group": [
553
- "lodash-es"
554
- ],
555
- "importNames": [
556
- "isObject"
557
- ],
558
- "message": "Please use val !== null && typeof val === 'object' instead."
559
- },
560
- {
561
- "group": [
562
- "lodash-es"
563
- ],
564
- "importNames": [
565
- "isString"
566
- ],
567
- "message": "Please use typeof val === 'string' instead."
568
- },
569
- {
570
- "group": [
571
- "lodash-es"
572
- ],
573
- "importNames": [
574
- "toString"
575
- ],
576
- "message": "Please use String(val) instead."
577
- },
578
- {
579
- "group": [
580
- "lodash-es"
581
- ],
582
- "importNames": [
583
- "flow",
584
- "flowRight"
585
- ],
586
- "message": "Please use refactoring your code instead."
587
- }
588
- ]
589
- }
590
- ],
591
- "sort-imports": [
592
- "error",
593
- {
594
- "ignoreCase": false,
595
- "ignoreDeclarationSort": true,
596
- "ignoreMemberSort": false
597
- }
598
- ],
599
- "no-useless-escape": "off",
600
- "no-unneeded-ternary": [
601
- "error",
602
- {
603
- "defaultAssignment": false
604
- }
605
- ],
606
- "no-extra-boolean-cast": "error",
607
- "no-unexpected-multiline": 0,
608
- "no-duplicate-imports": [
609
- "error",
610
- {
611
- "includeExports": true
612
- }
613
- ],
614
- "prefer-const": "off",
615
- "no-console": [
616
- 2,
617
- {
618
- "allow": [
619
- "warn",
620
- "error"
621
- ]
622
- }
623
- ],
624
- "no-restricted-exports": [
625
- 2,
626
- {
627
- "restrictDefaultExports": {
628
- "direct": true,
629
- "named": true,
630
- "defaultFrom": true,
631
- "namedFrom": true,
632
- "namespaceFrom": true
633
- }
634
- }
635
- ],
636
- "no-restricted-syntax": [
637
- "error",
638
- {
639
- "selector": "MemberExpression[object.name='React']",
640
- "message": "Do not use `React.*`. Use named imports instead."
641
- },
642
- {
643
- "selector": "MemberExpression[object.name='ReactDOM']",
644
- "message": "Do not use `ReactDOM.*`. Use named imports instead."
645
- }
646
- ],
647
- "no-negated-condition": "error",
648
- "header/header": [
649
- 2,
650
- "line",
651
- {
652
- "pattern": "^ \\(C\\) \\d{4}(-\\d{4})? GoodData Corporation$",
653
- "template": " (C) 2026 GoodData Corporation"
654
- }
655
- ],
656
- "no-barrel-files/no-barrel-files": "error",
657
- "import-x/named": "error",
658
- "import-x/namespace": "error",
659
- "import-x/default": "error",
660
- "import-x/export": "error",
661
- "import-x/no-named-as-default": "warn",
662
- "import-x/no-named-as-default-member": "warn",
663
- "import-x/no-duplicates": "warn",
664
- "import-x/no-unassigned-import": "error",
665
- "import-x/order": [
666
- "error",
667
- {
668
- "pathGroups": [
669
- {
670
- "pattern": "react",
671
- "group": "external",
672
- "position": "before"
673
- },
674
- {
675
- "pattern": "{@gooddata/**,gdc-*}",
676
- "group": "external",
677
- "position": "after"
678
- }
679
- ],
680
- "groups": [
681
- "builtin",
682
- "external",
683
- "internal",
684
- [
685
- "parent",
686
- "sibling",
687
- "index"
688
- ]
689
- ],
690
- "pathGroupsExcludedImportTypes": [
691
- "react"
692
- ],
693
- "alphabetize": {
694
- "order": "asc",
695
- "caseInsensitive": true
696
- },
697
- "newlines-between": "always"
698
- }
699
- ],
700
- "sonarjs/function-name": "off",
701
- "sonarjs/max-lines": "off",
702
- "sonarjs/no-tab": "off",
703
- "sonarjs/variable-name": "off",
704
- "sonarjs/comment-regex": "off",
705
- "sonarjs/elseif-without-else": "off",
706
- "sonarjs/no-fallthrough": "error",
707
- "sonarjs/nested-control-flow": "off",
708
- "sonarjs/too-many-break-or-continue-in-loop": "off",
709
- "sonarjs/max-lines-per-function": "off",
710
- "sonarjs/no-nested-incdec": "off",
711
- "sonarjs/no-equals-in-for-termination": "error",
712
- "sonarjs/no-extra-arguments": "error",
713
- "sonarjs/no-collapsible-if": "off",
714
- "sonarjs/expression-complexity": "off",
715
- "sonarjs/no-redundant-parentheses": "off",
716
- "sonarjs/no-labels": "error",
717
- "sonarjs/no-redundant-boolean": "error",
718
- "sonarjs/prefer-single-boolean-return": "error",
719
- "sonarjs/unused-import": "error",
720
- "sonarjs/useless-string-operation": "off",
721
- "sonarjs/no-unused-function-argument": "off",
722
- "sonarjs/no-case-label-in-switch": "error",
723
- "sonarjs/no-parameter-reassignment": "error",
724
- "sonarjs/prefer-while": "error",
725
- "sonarjs/no-sonar-comments": "off",
726
- "sonarjs/no-small-switch": "error",
727
- "sonarjs/no-hardcoded-ip": "error",
728
- "sonarjs/label-position": "error",
729
- "sonarjs/file-header": "off",
730
- "sonarjs/call-argument-line": "error",
731
- "sonarjs/max-switch-cases": "error",
732
- "sonarjs/prefer-immediate-return": "off",
733
- "sonarjs/function-inside-loop": "error",
734
- "sonarjs/no-variable-usage-before-declaration": "off",
735
- "sonarjs/future-reserved-words": "error",
736
- "sonarjs/array-constructor": "off",
737
- "sonarjs/bitwise-operators": "error",
738
- "sonarjs/no-function-declaration-in-block": "off",
739
- "sonarjs/no-primitive-wrappers": "error",
740
- "sonarjs/for-in": "off",
741
- "sonarjs/cyclomatic-complexity": "off",
742
- "sonarjs/no-identical-expressions": "error",
743
- "sonarjs/no-nested-switch": "off",
744
- "sonarjs/no-identical-conditions": "error",
745
- "sonarjs/no-duplicated-branches": "error",
746
- "sonarjs/misplaced-loop-counter": "error",
747
- "sonarjs/sql-queries": "error",
748
- "sonarjs/insecure-cookie": "error",
749
- "sonarjs/no-useless-increment": "error",
750
- "sonarjs/no-undefined-assignment": "off",
751
- "sonarjs/no-wildcard-import": "off",
752
- "sonarjs/for-loop-increment-sign": "error",
753
- "sonarjs/cookies": "off",
754
- "sonarjs/null-dereference": "error",
755
- "sonarjs/updated-loop-counter": "error",
756
- "sonarjs/block-scoped-var": "error",
757
- "sonarjs/no-built-in-override": "off",
758
- "sonarjs/prefer-object-literal": "off",
759
- "sonarjs/no-gratuitous-expressions": "error",
760
- "sonarjs/file-uploads": "error",
761
- "sonarjs/file-permissions": "error",
762
- "sonarjs/no-empty-character-class": "error",
763
- "sonarjs/no-unenclosed-multiline-block": "error",
764
- "sonarjs/index-of-compare-to-positive-number": "error",
765
- "sonarjs/no-useless-catch": "error",
766
- "sonarjs/xml-parser-xxe": "error",
767
- "sonarjs/non-existent-operator": "error",
768
- "sonarjs/web-sql-database": "off",
769
- "sonarjs/no-array-delete": "error",
770
- "sonarjs/no-incomplete-assertions": "error",
771
- "sonarjs/no-global-this": "error",
772
- "sonarjs/new-operator-misuse": "error",
773
- "sonarjs/no-delete-var": "error",
774
- "sonarjs/strings-comparison": "off",
775
- "sonarjs/file-name-differ-from-class": "off",
776
- "sonarjs/cookie-no-httponly": "error",
777
- "sonarjs/no-incorrect-string-concat": "off",
778
- "sonarjs/inverted-assertion-arguments": "error",
779
- "sonarjs/shorthand-property-grouping": "off",
780
- "sonarjs/updated-const-var": "error",
781
- "sonarjs/arguments-usage": "off",
782
- "sonarjs/destructuring-assignment-syntax": "off",
783
- "sonarjs/arrow-function-convention": "off",
784
- "sonarjs/class-prototype": "off",
785
- "sonarjs/no-require-or-define": "off",
786
- "sonarjs/no-associative-arrays": "error",
787
- "sonarjs/comma-or-logical-or-case": "error",
788
- "sonarjs/no-redundant-jump": "error",
789
- "sonarjs/inconsistent-function-call": "error",
790
- "sonarjs/no-use-of-empty-return-value": "error",
791
- "sonarjs/enforce-trailing-comma": "off",
792
- "sonarjs/operation-returning-nan": "off",
793
- "sonarjs/values-not-convertible-to-numbers": "off",
794
- "sonarjs/non-number-in-arithmetic-expression": "off",
795
- "sonarjs/in-operator-type-error": "error",
796
- "sonarjs/declarations-in-global-scope": "off",
797
- "sonarjs/no-inconsistent-returns": "off",
798
- "sonarjs/no-reference-error": "off",
799
- "sonarjs/super-invocation": "error",
800
- "sonarjs/no-all-duplicated-branches": "error",
801
- "sonarjs/no-same-line-conditional": "error",
802
- "sonarjs/conditional-indentation": "off",
803
- "sonarjs/no-collection-size-mischeck": "error",
804
- "sonarjs/no-unthrown-error": "error",
805
- "sonarjs/no-unused-collection": "error",
806
- "sonarjs/no-for-in-iterable": "off",
807
- "sonarjs/no-element-overwrite": "error",
808
- "sonarjs/no-identical-functions": "error",
809
- "sonarjs/no-empty-collection": "error",
810
- "sonarjs/no-redundant-assignments": "error",
811
- "sonarjs/prefer-type-guard": "error",
812
- "sonarjs/no-return-type-any": "off",
813
- "sonarjs/no-implicit-dependencies": "off",
814
- "sonarjs/weak-ssl": "error",
815
- "sonarjs/no-weak-keys": "error",
816
- "sonarjs/csrf": "error",
817
- "sonarjs/production-debug": "error",
818
- "sonarjs/no-in-misuse": "error",
819
- "sonarjs/no-duplicate-in-composite": "error",
820
- "sonarjs/max-union-size": "off",
821
- "sonarjs/no-nested-template-literals": "error",
822
- "sonarjs/regular-expr": "off",
823
- "sonarjs/encryption": "off",
824
- "sonarjs/hashing": "error",
825
- "sonarjs/bool-param-default": "off",
826
- "sonarjs/xpath": "off",
827
- "sonarjs/sockets": "off",
828
- "sonarjs/process-argv": "off",
829
- "sonarjs/standard-input": "off",
830
- "sonarjs/unverified-certificate": "error",
831
- "sonarjs/cors": "error",
832
- "sonarjs/disabled-auto-escaping": "error",
833
- "sonarjs/no-table-as-layout": "error",
834
- "sonarjs/table-header-reference": "error",
835
- "sonarjs/object-alt-content": "error",
836
- "sonarjs/publicly-writable-directories": "error",
837
- "sonarjs/unverified-hostname": "error",
838
- "sonarjs/encryption-secure-mode": "error",
839
- "sonarjs/no-weak-cipher": "error",
840
- "sonarjs/no-intrusive-permissions": "error",
841
- "sonarjs/insecure-jwt-token": "error",
842
- "sonarjs/x-powered-by": "error",
843
- "sonarjs/hidden-files": "error",
844
- "sonarjs/content-length": "error",
845
- "sonarjs/disabled-resource-integrity": "error",
846
- "sonarjs/content-security-policy": "error",
847
- "sonarjs/no-mixed-content": "error",
848
- "sonarjs/frame-ancestors": "error",
849
- "sonarjs/no-mime-sniff": "error",
850
- "sonarjs/no-referrer-policy": "error",
851
- "sonarjs/strict-transport-security": "error",
852
- "sonarjs/certificate-transparency": "off",
853
- "sonarjs/dns-prefetching": "off",
854
- "sonarjs/confidential-information-logging": "error",
855
- "sonarjs/no-ip-forward": "error",
856
- "sonarjs/no-invalid-regexp": "error",
857
- "sonarjs/unused-named-groups": "error",
858
- "sonarjs/no-same-argument-assert": "error",
859
- "sonarjs/unicode-aware-regex": "off",
860
- "sonarjs/no-misleading-character-class": "error",
861
- "sonarjs/session-regeneration": "error",
862
- "sonarjs/test-check-exception": "error",
863
- "sonarjs/stable-tests": "error",
864
- "sonarjs/no-empty-after-reluctant": "error",
865
- "sonarjs/no-code-after-done": "error",
866
- "sonarjs/disabled-timeout": "error",
867
- "sonarjs/chai-determinate-assertion": "error",
868
- "sonarjs/aws-s3-bucket-server-encryption": "off",
869
- "sonarjs/aws-s3-bucket-insecure-http": "error",
870
- "sonarjs/aws-s3-bucket-versioning": "error",
871
- "sonarjs/aws-s3-bucket-granted-access": "error",
872
- "sonarjs/no-angular-bypass-sanitization": "error",
873
- "sonarjs/aws-iam-public-access": "error",
874
- "sonarjs/aws-ec2-unencrypted-ebs-volume": "error",
875
- "sonarjs/aws-s3-bucket-public-access": "error",
876
- "sonarjs/no-vue-bypass-sanitization": "off",
877
- "sonarjs/aws-iam-all-privileges": "error",
878
- "sonarjs/aws-rds-unencrypted-databases": "error",
879
- "sonarjs/aws-iam-all-resources-accessible": "off",
880
- "sonarjs/aws-opensearchservice-domain": "error",
881
- "sonarjs/aws-iam-privilege-escalation": "error",
882
- "sonarjs/aws-sagemaker-unencrypted-notebook": "error",
883
- "sonarjs/aws-restricted-ip-admin-access": "error",
884
- "sonarjs/no-empty-alternatives": "error",
885
- "sonarjs/no-regex-spaces": "error",
886
- "sonarjs/aws-sns-unencrypted-topics": "error",
887
- "sonarjs/existing-groups": "error",
888
- "sonarjs/aws-ec2-rds-dms-public": "error",
889
- "sonarjs/aws-sqs-unencrypted-queue": "error",
890
- "sonarjs/no-empty-group": "error",
891
- "sonarjs/aws-efs-unencrypted": "error",
892
- "sonarjs/aws-apigateway-public-api": "error",
893
- "sonarjs/stateful-regex": "error",
894
- "sonarjs/single-char-in-character-classes": "error",
895
- "sonarjs/no-exclusive-tests": "error",
896
- "sonarjs/hardcoded-secret-signatures": "error",
897
- "sonarjs/jsx-no-leaked-render": "error",
898
- "sonarjs/no-hook-setter-in-body": "error",
899
- "sonarjs/no-uniq-key": "error",
900
- "sonarjs/no-internal-api-use": "error",
901
- "sonarjs/no-literal-call": "error",
902
- "sonarjs/review-blockchain-mnemonic": "error",
903
- "sonarjs/dynamically-constructed-templates": "error",
904
- "sonarjs/no-duplicate-string": "off",
905
- "sonarjs/cognitive-complexity": "warn",
906
- "sonarjs/todo-tag": "warn",
907
- "sonarjs/no-hardcoded-passwords": "off",
908
- "sonarjs/no-alphabetical-sort": "off",
909
- "sonarjs/no-os-command-from-path": "off",
910
- "sonarjs/os-command": "off",
911
- "sonarjs/prefer-regexp-exec": "off",
912
- "sonarjs/no-clear-text-protocols": "off",
913
- "sonarjs/deprecation": "off",
914
- "sonarjs/no-nested-conditional": "off",
915
- "sonarjs/no-ignored-exceptions": "off",
916
- "sonarjs/slow-regex": "off",
917
- "sonarjs/prefer-read-only-props": "off",
918
- "sonarjs/no-skipped-tests": "off",
919
- "sonarjs/no-commented-code": "off",
920
- "sonarjs/no-ignored-return": "off",
921
- "sonarjs/array-callback-without-return": "off",
922
- "sonarjs/pseudo-random": "off",
923
- "sonarjs/no-nested-functions": "off",
924
- "sonarjs/no-async-constructor": "off",
925
- "sonarjs/assertions-in-tests": "off",
926
- "sonarjs/function-return-type": "off",
927
- "sonarjs/no-unused-vars": "off",
928
- "sonarjs/no-invariant-returns": "off",
929
- "sonarjs/different-types-comparison": "off",
930
- "sonarjs/no-selector-parameter": "off",
931
- "sonarjs/anchor-precedence": "off",
932
- "sonarjs/redundant-type-aliases": "off",
933
- "sonarjs/no-redundant-optional": "off",
934
- "sonarjs/reduce-initial-value": "off",
935
- "sonarjs/no-globals-shadowing": "off",
936
- "sonarjs/use-type-alias": "off",
937
- "sonarjs/void-use": "off",
938
- "sonarjs/no-undefined-argument": "off",
939
- "sonarjs/no-useless-react-setstate": "off",
940
- "sonarjs/no-inverted-boolean-check": "off",
941
- "sonarjs/concise-regex": "off",
942
- "sonarjs/no-dead-store": "off",
943
- "sonarjs/public-static-readonly": "off",
944
- "sonarjs/code-eval": "off",
945
- "sonarjs/no-misleading-array-reverse": "off",
946
- "sonarjs/fixme-tag": "off",
947
- "sonarjs/argument-type": "off",
948
- "sonarjs/constructor-for-side-effects": "off",
949
- "sonarjs/no-useless-intersection": "off",
950
- "sonarjs/no-empty-test-file": "off",
951
- "sonarjs/prefer-default-last": "off",
952
- "sonarjs/prefer-promise-shorthand": "off",
953
- "sonarjs/no-unsafe-unzip": "off",
954
- "sonarjs/no-nested-assignment": "off",
955
- "sonarjs/generator-without-yield": "off",
956
- "sonarjs/no-try-promise": "off",
957
- "sonarjs/single-character-alternation": "off",
958
- "sonarjs/class-name": "off",
959
- "sonarjs/no-hardcoded-secrets": "off",
960
- "sonarjs/regex-complexity": "off",
961
- "sonarjs/post-message": "off",
962
- "sonarjs/link-with-target-blank": "off",
963
- "sonarjs/duplicates-in-character-class": "off",
964
- "sonarjs/arguments-order": "off",
965
- "sonarjs/empty-string-repetition": "off",
966
- "sonarjs/table-header": "off",
967
- "sonarjs/no-implicit-global": "off",
968
- "sonarjs/no-control-regex": "off",
969
- "no-caller": 2,
970
- "no-eval": 2,
971
- "no-octal-escape": 2,
972
- "curly": 0,
973
- "@typescript-eslint/lines-around-comment": 0,
974
- "@typescript-eslint/quotes": 0,
975
- "unicorn/template-indent": 0,
976
- "@typescript-eslint/block-spacing": "off",
977
- "@typescript-eslint/brace-style": "off",
978
- "@typescript-eslint/comma-dangle": "off",
979
- "@typescript-eslint/comma-spacing": "off",
980
- "@typescript-eslint/func-call-spacing": "off",
981
- "@typescript-eslint/indent": "off",
982
- "@typescript-eslint/key-spacing": "off",
983
- "@typescript-eslint/keyword-spacing": "off",
984
- "@typescript-eslint/member-delimiter-style": "off",
985
- "@typescript-eslint/no-extra-parens": "off",
986
- "@typescript-eslint/no-extra-semi": "off",
987
- "@typescript-eslint/object-curly-spacing": "off",
988
- "@typescript-eslint/semi": "off",
989
- "@typescript-eslint/space-before-blocks": "off",
990
- "@typescript-eslint/space-before-function-paren": "off",
991
- "@typescript-eslint/space-infix-ops": "off",
992
- "@typescript-eslint/type-annotation-spacing": "off",
993
- "react/jsx-child-element-spacing": "off",
994
- "react/jsx-closing-bracket-location": "off",
995
- "react/jsx-closing-tag-location": "off",
996
- "react/jsx-curly-newline": "off",
997
- "react/jsx-curly-spacing": "off",
998
- "react/jsx-equals-spacing": "off",
999
- "react/jsx-first-prop-new-line": "off",
1000
- "react/jsx-indent": "off",
1001
- "react/jsx-indent-props": "off",
1002
- "react/jsx-max-props-per-line": "off",
1003
- "react/jsx-newline": "off",
1004
- "react/jsx-one-expression-per-line": "off",
1005
- "react/jsx-props-no-multi-spaces": "off",
1006
- "react/jsx-tag-spacing": "off",
1007
- "react/jsx-wrap-multilines": "off",
1008
- "unicorn/empty-brace-spaces": "off",
1009
- "unicorn/no-nested-ternary": "off",
1010
- "unicorn/number-literal-case": "off",
1011
- "import-esm/explicit-extension": "error",
1012
- "cypress/no-async-tests": "error",
1013
- "cypress/no-unnecessary-waiting": "warn",
1014
- "cypress/no-assigning-return-values": "warn",
1015
- "cypress/unsafe-to-chain-command": "warn",
1016
- "no-unused-expressions": "off",
1017
- "chai-friendly/no-unused-expressions": "error",
1018
- "no-only-tests/no-only-tests": [
1019
- "error",
1020
- {
1021
- "block": [
1022
- "fixture"
1023
- ],
1024
- "focus": [
1025
- "only"
1026
- ]
1027
- }
1028
- ]
1029
- },
1030
- "overrides": [
1031
- {
1032
- "files": [
1033
- "**/*.ts",
1034
- "**/*.tsx"
1035
- ],
1036
- "rules": {
1037
- "no-restricted-imports": [
1038
- "error",
1039
- {
1040
- "paths": [
1041
- {
1042
- "name": "react",
1043
- "importNames": [
1044
- "default"
1045
- ],
1046
- "message": "Default import from React is not allowed. Use named imports instead."
1047
- },
1048
- {
1049
- "name": "react-dom",
1050
- "importNames": [
1051
- "default"
1052
- ],
1053
- "message": "Default import from React DOM is not allowed. Use named imports instead."
1054
- },
1055
- {
1056
- "name": "@gooddata/sdk-ui-kit",
1057
- "importNames": [
1058
- "Icon"
1059
- ],
1060
- "message": "The Icon export cannot be tree-shaken, use {IconName}Icon imports instead."
1061
- },
1062
- {
1063
- "name": "vitest",
1064
- "importNames": [
1065
- "test"
1066
- ],
1067
- "message": "Use 'it' instead of 'test' for consistency."
1068
- }
1069
- ],
1070
- "patterns": [
1071
- {
1072
- "group": [
1073
- "lodash-es"
1074
- ],
1075
- "importNames": [
1076
- "get",
1077
- "getOr"
1078
- ],
1079
- "message": "Please use the ?. and ?? operators instead."
1080
- },
1081
- {
1082
- "group": [
1083
- "lodash-es"
1084
- ],
1085
- "importNames": [
1086
- "keys"
1087
- ],
1088
- "message": "Please use Object.keys() instead."
1089
- },
1090
- {
1091
- "group": [
1092
- "lodash-es"
1093
- ],
1094
- "importNames": [
1095
- "values"
1096
- ],
1097
- "message": "Please use Object.values() instead."
1098
- },
1099
- {
1100
- "group": [
1101
- "lodash-es"
1102
- ],
1103
- "importNames": [
1104
- "entries",
1105
- "toPairs"
1106
- ],
1107
- "message": "Please use Object.entries() instead."
1108
- },
1109
- {
1110
- "group": [
1111
- "lodash-es"
1112
- ],
1113
- "importNames": [
1114
- "map"
1115
- ],
1116
- "message": "Please use Array.prototype.map() instead."
1117
- },
1118
- {
1119
- "group": [
1120
- "lodash-es"
1121
- ],
1122
- "importNames": [
1123
- "flatMap"
1124
- ],
1125
- "message": "Please use Array.prototype.flatMap() instead."
1126
- },
1127
- {
1128
- "group": [
1129
- "lodash-es"
1130
- ],
1131
- "importNames": [
1132
- "filter"
1133
- ],
1134
- "message": "Please use Array.prototype.filter() instead."
1135
- },
1136
- {
1137
- "group": [
1138
- "lodash-es"
1139
- ],
1140
- "importNames": [
1141
- "find"
1142
- ],
1143
- "message": "Please use Array.prototype.find() instead."
1144
- },
1145
- {
1146
- "group": [
1147
- "lodash-es"
1148
- ],
1149
- "importNames": [
1150
- "findIndex"
1151
- ],
1152
- "message": "Please use Array.prototype.findIndex() instead."
1153
- },
1154
- {
1155
- "group": [
1156
- "lodash-es"
1157
- ],
1158
- "importNames": [
1159
- "includes"
1160
- ],
1161
- "message": "Please use Array.prototype.includes() instead."
1162
- },
1163
- {
1164
- "group": [
1165
- "lodash-es"
1166
- ],
1167
- "importNames": [
1168
- "some"
1169
- ],
1170
- "message": "Please use Array.prototype.some() instead."
1171
- },
1172
- {
1173
- "group": [
1174
- "lodash-es"
1175
- ],
1176
- "importNames": [
1177
- "every"
1178
- ],
1179
- "message": "Please use Array.prototype.every() instead."
1180
- },
1181
- {
1182
- "group": [
1183
- "lodash-es"
1184
- ],
1185
- "importNames": [
1186
- "concat"
1187
- ],
1188
- "message": "Please use Array.prototype.concat() or spread [...arr1, ...arr2] instead."
1189
- },
1190
- {
1191
- "group": [
1192
- "lodash-es"
1193
- ],
1194
- "importNames": [
1195
- "reverse"
1196
- ],
1197
- "message": "Please use Array.prototype.reverse() instead."
1198
- },
1199
- {
1200
- "group": [
1201
- "lodash-es"
1202
- ],
1203
- "importNames": [
1204
- "slice"
1205
- ],
1206
- "message": "Please use Array.prototype.slice() instead."
1207
- },
1208
- {
1209
- "group": [
1210
- "lodash-es"
1211
- ],
1212
- "importNames": [
1213
- "indexOf"
1214
- ],
1215
- "message": "Please use Array.prototype.indexOf() instead."
1216
- },
1217
- {
1218
- "group": [
1219
- "lodash-es"
1220
- ],
1221
- "importNames": [
1222
- "lastIndexOf"
1223
- ],
1224
- "message": "Please use Array.prototype.lastIndexOf() instead."
1225
- },
1226
- {
1227
- "group": [
1228
- "lodash-es"
1229
- ],
1230
- "importNames": [
1231
- "fill"
1232
- ],
1233
- "message": "Please use Array.prototype.fill() instead."
1234
- },
1235
- {
1236
- "group": [
1237
- "lodash-es"
1238
- ],
1239
- "importNames": [
1240
- "startsWith"
1241
- ],
1242
- "message": "Please use String.prototype.startsWith() instead."
1243
- },
1244
- {
1245
- "group": [
1246
- "lodash-es"
1247
- ],
1248
- "importNames": [
1249
- "endsWith"
1250
- ],
1251
- "message": "Please use String.prototype.endsWith() instead."
1252
- },
1253
- {
1254
- "group": [
1255
- "lodash-es"
1256
- ],
1257
- "importNames": [
1258
- "repeat"
1259
- ],
1260
- "message": "Please use String.prototype.repeat() instead."
1261
- },
1262
- {
1263
- "group": [
1264
- "lodash-es"
1265
- ],
1266
- "importNames": [
1267
- "padStart"
1268
- ],
1269
- "message": "Please use String.prototype.padStart() instead."
1270
- },
1271
- {
1272
- "group": [
1273
- "lodash-es"
1274
- ],
1275
- "importNames": [
1276
- "padEnd"
1277
- ],
1278
- "message": "Please use String.prototype.padEnd() instead."
1279
- },
1280
- {
1281
- "group": [
1282
- "lodash-es"
1283
- ],
1284
- "importNames": [
1285
- "trim"
1286
- ],
1287
- "message": "Please use String.prototype.trim() instead."
1288
- },
1289
- {
1290
- "group": [
1291
- "lodash-es"
1292
- ],
1293
- "importNames": [
1294
- "trimStart",
1295
- "trimLeft"
1296
- ],
1297
- "message": "Please use String.prototype.trimStart() instead."
1298
- },
1299
- {
1300
- "group": [
1301
- "lodash-es"
1302
- ],
1303
- "importNames": [
1304
- "trimEnd",
1305
- "trimRight"
1306
- ],
1307
- "message": "Please use String.prototype.trimEnd() instead."
1308
- },
1309
- {
1310
- "group": [
1311
- "lodash-es"
1312
- ],
1313
- "importNames": [
1314
- "toUpper"
1315
- ],
1316
- "message": "Please use String.prototype.toUpperCase() instead."
1317
- },
1318
- {
1319
- "group": [
1320
- "lodash-es"
1321
- ],
1322
- "importNames": [
1323
- "toLower"
1324
- ],
1325
- "message": "Please use String.prototype.toLowerCase() instead."
1326
- },
1327
- {
1328
- "group": [
1329
- "lodash-es"
1330
- ],
1331
- "importNames": [
1332
- "isArray"
1333
- ],
1334
- "message": "Please use Array.isArray() instead."
1335
- },
1336
- {
1337
- "group": [
1338
- "lodash-es"
1339
- ],
1340
- "importNames": [
1341
- "isNaN"
1342
- ],
1343
- "message": "Please use Number.isNaN() instead."
1344
- },
1345
- {
1346
- "group": [
1347
- "lodash-es"
1348
- ],
1349
- "importNames": [
1350
- "isFinite"
1351
- ],
1352
- "message": "Please use Number.isFinite() instead."
1353
- },
1354
- {
1355
- "group": [
1356
- "lodash-es"
1357
- ],
1358
- "importNames": [
1359
- "isInteger"
1360
- ],
1361
- "message": "Please use Number.isInteger() instead."
1362
- },
1363
- {
1364
- "group": [
1365
- "lodash-es"
1366
- ],
1367
- "importNames": [
1368
- "isNull"
1369
- ],
1370
- "message": "Please use value === null instead."
1371
- },
1372
- {
1373
- "group": [
1374
- "lodash-es"
1375
- ],
1376
- "importNames": [
1377
- "isUndefined"
1378
- ],
1379
- "message": "Please use value === undefined instead."
1380
- },
1381
- {
1382
- "group": [
1383
- "lodash-es"
1384
- ],
1385
- "importNames": [
1386
- "defaultTo"
1387
- ],
1388
- "message": "Please use value ?? defaultValue instead."
1389
- },
1390
- {
1391
- "group": [
1392
- "lodash-es"
1393
- ],
1394
- "importNames": [
1395
- "assign"
1396
- ],
1397
- "message": "Please use Object.assign() or spread syntax {...obj} instead."
1398
- },
1399
- {
1400
- "group": [
1401
- "lodash-es"
1402
- ],
1403
- "importNames": [
1404
- "flatten"
1405
- ],
1406
- "message": "Please use Array.prototype.flat() instead."
1407
- },
1408
- {
1409
- "group": [
1410
- "lodash-es"
1411
- ],
1412
- "importNames": [
1413
- "flattenDeep"
1414
- ],
1415
- "message": "Please use Array.prototype.flat(Infinity) instead."
1416
- },
1417
- {
1418
- "group": [
1419
- "lodash-es"
1420
- ],
1421
- "importNames": [
1422
- "isNil"
1423
- ],
1424
- "message": "Please use value === null || value === undefined instead."
1425
- },
1426
- {
1427
- "group": [
1428
- "lodash-es"
1429
- ],
1430
- "importNames": [
1431
- "noop"
1432
- ],
1433
- "message": "Please use () => {} instead."
1434
- },
1435
- {
1436
- "group": [
1437
- "lodash-es"
1438
- ],
1439
- "importNames": [
1440
- "identity"
1441
- ],
1442
- "message": "Please use x => x instead."
1443
- },
1444
- {
1445
- "group": [
1446
- "lodash-es"
1447
- ],
1448
- "importNames": [
1449
- "first",
1450
- "head"
1451
- ],
1452
- "message": "Please use Array.prototype.at(0) instead."
1453
- },
1454
- {
1455
- "group": [
1456
- "lodash-es"
1457
- ],
1458
- "importNames": [
1459
- "last"
1460
- ],
1461
- "message": "Please use Array.prototype.at(-1) instead."
1462
- },
1463
- {
1464
- "group": [
1465
- "lodash-es"
1466
- ],
1467
- "importNames": [
1468
- "forEach"
1469
- ],
1470
- "message": "Please use Array.prototype.forEach() instead."
1471
- },
1472
- {
1473
- "group": [
1474
- "lodash-es"
1475
- ],
1476
- "importNames": [
1477
- "fromPairs"
1478
- ],
1479
- "message": "Please use Object.fromEntries() instead."
1480
- },
1481
- {
1482
- "group": [
1483
- "lodash-es"
1484
- ],
1485
- "importNames": [
1486
- "join"
1487
- ],
1488
- "message": "Please use Array.prototype.join() instead."
1489
- },
1490
- {
1491
- "group": [
1492
- "lodash-es"
1493
- ],
1494
- "importNames": [
1495
- "isDate"
1496
- ],
1497
- "message": "Please use val instanceof Date instead."
1498
- },
1499
- {
1500
- "group": [
1501
- "lodash-es"
1502
- ],
1503
- "importNames": [
1504
- "isFunction"
1505
- ],
1506
- "message": "Please use typeof val === 'function' instead."
1507
- },
1508
- {
1509
- "group": [
1510
- "lodash-es"
1511
- ],
1512
- "importNames": [
1513
- "isNumber"
1514
- ],
1515
- "message": "Please use typeof val === 'number' instead."
1516
- },
1517
- {
1518
- "group": [
1519
- "lodash-es"
1520
- ],
1521
- "importNames": [
1522
- "isObject"
1523
- ],
1524
- "message": "Please use val !== null && typeof val === 'object' instead."
1525
- },
1526
- {
1527
- "group": [
1528
- "lodash-es"
1529
- ],
1530
- "importNames": [
1531
- "isString"
1532
- ],
1533
- "message": "Please use typeof val === 'string' instead."
1534
- },
1535
- {
1536
- "group": [
1537
- "lodash-es"
1538
- ],
1539
- "importNames": [
1540
- "toString"
1541
- ],
1542
- "message": "Please use String(val) instead."
1543
- },
1544
- {
1545
- "group": [
1546
- "lodash-es"
1547
- ],
1548
- "importNames": [
1549
- "flow",
1550
- "flowRight"
1551
- ],
1552
- "message": "Please use refactoring your code instead."
1553
- },
1554
- {
1555
- "group": [
1556
- "vitest"
1557
- ],
1558
- "message": "Importing from vitest is only allowed in test files."
1559
- }
1560
- ]
1561
- }
1562
- ]
1563
- }
1564
- },
1565
- {
1566
- "files": [
1567
- "**/vitest.config.ts",
1568
- "**/vitest.*.config.ts",
1569
- "**/vitest.setup.ts",
1570
- "**/vitest.setup.tsx",
1571
- "**/*.test.ts",
1572
- "**/*.test.tsx",
1573
- "**/*.test.utils.ts",
1574
- "**/*.test.utils.tsx",
1575
- "**/*.test.helpers.ts",
1576
- "**/*.test.helpers.tsx"
1577
- ],
1578
- "rules": {
1579
- "no-restricted-imports": [
1580
- "error",
1581
- {
1582
- "paths": [
1583
- {
1584
- "name": "react",
1585
- "importNames": [
1586
- "default"
1587
- ],
1588
- "message": "Default import from React is not allowed. Use named imports instead."
1589
- },
1590
- {
1591
- "name": "react-dom",
1592
- "importNames": [
1593
- "default"
1594
- ],
1595
- "message": "Default import from React DOM is not allowed. Use named imports instead."
1596
- },
1597
- {
1598
- "name": "@gooddata/sdk-ui-kit",
1599
- "importNames": [
1600
- "Icon"
1601
- ],
1602
- "message": "The Icon export cannot be tree-shaken, use {IconName}Icon imports instead."
1603
- },
1604
- {
1605
- "name": "vitest",
1606
- "importNames": [
1607
- "test"
1608
- ],
1609
- "message": "Use 'it' instead of 'test' for consistency."
1610
- }
1611
- ],
1612
- "patterns": [
1613
- {
1614
- "group": [
1615
- "lodash-es"
1616
- ],
1617
- "importNames": [
1618
- "get",
1619
- "getOr"
1620
- ],
1621
- "message": "Please use the ?. and ?? operators instead."
1622
- },
1623
- {
1624
- "group": [
1625
- "lodash-es"
1626
- ],
1627
- "importNames": [
1628
- "keys"
1629
- ],
1630
- "message": "Please use Object.keys() instead."
1631
- },
1632
- {
1633
- "group": [
1634
- "lodash-es"
1635
- ],
1636
- "importNames": [
1637
- "values"
1638
- ],
1639
- "message": "Please use Object.values() instead."
1640
- },
1641
- {
1642
- "group": [
1643
- "lodash-es"
1644
- ],
1645
- "importNames": [
1646
- "entries",
1647
- "toPairs"
1648
- ],
1649
- "message": "Please use Object.entries() instead."
1650
- },
1651
- {
1652
- "group": [
1653
- "lodash-es"
1654
- ],
1655
- "importNames": [
1656
- "map"
1657
- ],
1658
- "message": "Please use Array.prototype.map() instead."
1659
- },
1660
- {
1661
- "group": [
1662
- "lodash-es"
1663
- ],
1664
- "importNames": [
1665
- "flatMap"
1666
- ],
1667
- "message": "Please use Array.prototype.flatMap() instead."
1668
- },
1669
- {
1670
- "group": [
1671
- "lodash-es"
1672
- ],
1673
- "importNames": [
1674
- "filter"
1675
- ],
1676
- "message": "Please use Array.prototype.filter() instead."
1677
- },
1678
- {
1679
- "group": [
1680
- "lodash-es"
1681
- ],
1682
- "importNames": [
1683
- "find"
1684
- ],
1685
- "message": "Please use Array.prototype.find() instead."
1686
- },
1687
- {
1688
- "group": [
1689
- "lodash-es"
1690
- ],
1691
- "importNames": [
1692
- "findIndex"
1693
- ],
1694
- "message": "Please use Array.prototype.findIndex() instead."
1695
- },
1696
- {
1697
- "group": [
1698
- "lodash-es"
1699
- ],
1700
- "importNames": [
1701
- "includes"
1702
- ],
1703
- "message": "Please use Array.prototype.includes() instead."
1704
- },
1705
- {
1706
- "group": [
1707
- "lodash-es"
1708
- ],
1709
- "importNames": [
1710
- "some"
1711
- ],
1712
- "message": "Please use Array.prototype.some() instead."
1713
- },
1714
- {
1715
- "group": [
1716
- "lodash-es"
1717
- ],
1718
- "importNames": [
1719
- "every"
1720
- ],
1721
- "message": "Please use Array.prototype.every() instead."
1722
- },
1723
- {
1724
- "group": [
1725
- "lodash-es"
1726
- ],
1727
- "importNames": [
1728
- "concat"
1729
- ],
1730
- "message": "Please use Array.prototype.concat() or spread [...arr1, ...arr2] instead."
1731
- },
1732
- {
1733
- "group": [
1734
- "lodash-es"
1735
- ],
1736
- "importNames": [
1737
- "reverse"
1738
- ],
1739
- "message": "Please use Array.prototype.reverse() instead."
1740
- },
1741
- {
1742
- "group": [
1743
- "lodash-es"
1744
- ],
1745
- "importNames": [
1746
- "slice"
1747
- ],
1748
- "message": "Please use Array.prototype.slice() instead."
1749
- },
1750
- {
1751
- "group": [
1752
- "lodash-es"
1753
- ],
1754
- "importNames": [
1755
- "indexOf"
1756
- ],
1757
- "message": "Please use Array.prototype.indexOf() instead."
1758
- },
1759
- {
1760
- "group": [
1761
- "lodash-es"
1762
- ],
1763
- "importNames": [
1764
- "lastIndexOf"
1765
- ],
1766
- "message": "Please use Array.prototype.lastIndexOf() instead."
1767
- },
1768
- {
1769
- "group": [
1770
- "lodash-es"
1771
- ],
1772
- "importNames": [
1773
- "fill"
1774
- ],
1775
- "message": "Please use Array.prototype.fill() instead."
1776
- },
1777
- {
1778
- "group": [
1779
- "lodash-es"
1780
- ],
1781
- "importNames": [
1782
- "startsWith"
1783
- ],
1784
- "message": "Please use String.prototype.startsWith() instead."
1785
- },
1786
- {
1787
- "group": [
1788
- "lodash-es"
1789
- ],
1790
- "importNames": [
1791
- "endsWith"
1792
- ],
1793
- "message": "Please use String.prototype.endsWith() instead."
1794
- },
1795
- {
1796
- "group": [
1797
- "lodash-es"
1798
- ],
1799
- "importNames": [
1800
- "repeat"
1801
- ],
1802
- "message": "Please use String.prototype.repeat() instead."
1803
- },
1804
- {
1805
- "group": [
1806
- "lodash-es"
1807
- ],
1808
- "importNames": [
1809
- "padStart"
1810
- ],
1811
- "message": "Please use String.prototype.padStart() instead."
1812
- },
1813
- {
1814
- "group": [
1815
- "lodash-es"
1816
- ],
1817
- "importNames": [
1818
- "padEnd"
1819
- ],
1820
- "message": "Please use String.prototype.padEnd() instead."
1821
- },
1822
- {
1823
- "group": [
1824
- "lodash-es"
1825
- ],
1826
- "importNames": [
1827
- "trim"
1828
- ],
1829
- "message": "Please use String.prototype.trim() instead."
1830
- },
1831
- {
1832
- "group": [
1833
- "lodash-es"
1834
- ],
1835
- "importNames": [
1836
- "trimStart",
1837
- "trimLeft"
1838
- ],
1839
- "message": "Please use String.prototype.trimStart() instead."
1840
- },
1841
- {
1842
- "group": [
1843
- "lodash-es"
1844
- ],
1845
- "importNames": [
1846
- "trimEnd",
1847
- "trimRight"
1848
- ],
1849
- "message": "Please use String.prototype.trimEnd() instead."
1850
- },
1851
- {
1852
- "group": [
1853
- "lodash-es"
1854
- ],
1855
- "importNames": [
1856
- "toUpper"
1857
- ],
1858
- "message": "Please use String.prototype.toUpperCase() instead."
1859
- },
1860
- {
1861
- "group": [
1862
- "lodash-es"
1863
- ],
1864
- "importNames": [
1865
- "toLower"
1866
- ],
1867
- "message": "Please use String.prototype.toLowerCase() instead."
1868
- },
1869
- {
1870
- "group": [
1871
- "lodash-es"
1872
- ],
1873
- "importNames": [
1874
- "isArray"
1875
- ],
1876
- "message": "Please use Array.isArray() instead."
1877
- },
1878
- {
1879
- "group": [
1880
- "lodash-es"
1881
- ],
1882
- "importNames": [
1883
- "isNaN"
1884
- ],
1885
- "message": "Please use Number.isNaN() instead."
1886
- },
1887
- {
1888
- "group": [
1889
- "lodash-es"
1890
- ],
1891
- "importNames": [
1892
- "isFinite"
1893
- ],
1894
- "message": "Please use Number.isFinite() instead."
1895
- },
1896
- {
1897
- "group": [
1898
- "lodash-es"
1899
- ],
1900
- "importNames": [
1901
- "isInteger"
1902
- ],
1903
- "message": "Please use Number.isInteger() instead."
1904
- },
1905
- {
1906
- "group": [
1907
- "lodash-es"
1908
- ],
1909
- "importNames": [
1910
- "isNull"
1911
- ],
1912
- "message": "Please use value === null instead."
1913
- },
1914
- {
1915
- "group": [
1916
- "lodash-es"
1917
- ],
1918
- "importNames": [
1919
- "isUndefined"
1920
- ],
1921
- "message": "Please use value === undefined instead."
1922
- },
1923
- {
1924
- "group": [
1925
- "lodash-es"
1926
- ],
1927
- "importNames": [
1928
- "defaultTo"
1929
- ],
1930
- "message": "Please use value ?? defaultValue instead."
1931
- },
1932
- {
1933
- "group": [
1934
- "lodash-es"
1935
- ],
1936
- "importNames": [
1937
- "assign"
1938
- ],
1939
- "message": "Please use Object.assign() or spread syntax {...obj} instead."
1940
- },
1941
- {
1942
- "group": [
1943
- "lodash-es"
1944
- ],
1945
- "importNames": [
1946
- "flatten"
1947
- ],
1948
- "message": "Please use Array.prototype.flat() instead."
1949
- },
1950
- {
1951
- "group": [
1952
- "lodash-es"
1953
- ],
1954
- "importNames": [
1955
- "flattenDeep"
1956
- ],
1957
- "message": "Please use Array.prototype.flat(Infinity) instead."
1958
- },
1959
- {
1960
- "group": [
1961
- "lodash-es"
1962
- ],
1963
- "importNames": [
1964
- "isNil"
1965
- ],
1966
- "message": "Please use value === null || value === undefined instead."
1967
- },
1968
- {
1969
- "group": [
1970
- "lodash-es"
1971
- ],
1972
- "importNames": [
1973
- "noop"
1974
- ],
1975
- "message": "Please use () => {} instead."
1976
- },
1977
- {
1978
- "group": [
1979
- "lodash-es"
1980
- ],
1981
- "importNames": [
1982
- "identity"
1983
- ],
1984
- "message": "Please use x => x instead."
1985
- },
1986
- {
1987
- "group": [
1988
- "lodash-es"
1989
- ],
1990
- "importNames": [
1991
- "first",
1992
- "head"
1993
- ],
1994
- "message": "Please use Array.prototype.at(0) instead."
1995
- },
1996
- {
1997
- "group": [
1998
- "lodash-es"
1999
- ],
2000
- "importNames": [
2001
- "last"
2002
- ],
2003
- "message": "Please use Array.prototype.at(-1) instead."
2004
- },
2005
- {
2006
- "group": [
2007
- "lodash-es"
2008
- ],
2009
- "importNames": [
2010
- "forEach"
2011
- ],
2012
- "message": "Please use Array.prototype.forEach() instead."
2013
- },
2014
- {
2015
- "group": [
2016
- "lodash-es"
2017
- ],
2018
- "importNames": [
2019
- "fromPairs"
2020
- ],
2021
- "message": "Please use Object.fromEntries() instead."
2022
- },
2023
- {
2024
- "group": [
2025
- "lodash-es"
2026
- ],
2027
- "importNames": [
2028
- "join"
2029
- ],
2030
- "message": "Please use Array.prototype.join() instead."
2031
- },
2032
- {
2033
- "group": [
2034
- "lodash-es"
2035
- ],
2036
- "importNames": [
2037
- "isDate"
2038
- ],
2039
- "message": "Please use val instanceof Date instead."
2040
- },
2041
- {
2042
- "group": [
2043
- "lodash-es"
2044
- ],
2045
- "importNames": [
2046
- "isFunction"
2047
- ],
2048
- "message": "Please use typeof val === 'function' instead."
2049
- },
2050
- {
2051
- "group": [
2052
- "lodash-es"
2053
- ],
2054
- "importNames": [
2055
- "isNumber"
2056
- ],
2057
- "message": "Please use typeof val === 'number' instead."
2058
- },
2059
- {
2060
- "group": [
2061
- "lodash-es"
2062
- ],
2063
- "importNames": [
2064
- "isObject"
2065
- ],
2066
- "message": "Please use val !== null && typeof val === 'object' instead."
2067
- },
2068
- {
2069
- "group": [
2070
- "lodash-es"
2071
- ],
2072
- "importNames": [
2073
- "isString"
2074
- ],
2075
- "message": "Please use typeof val === 'string' instead."
2076
- },
2077
- {
2078
- "group": [
2079
- "lodash-es"
2080
- ],
2081
- "importNames": [
2082
- "toString"
2083
- ],
2084
- "message": "Please use String(val) instead."
2085
- },
2086
- {
2087
- "group": [
2088
- "lodash-es"
2089
- ],
2090
- "importNames": [
2091
- "flow",
2092
- "flowRight"
2093
- ],
2094
- "message": "Please use refactoring your code instead."
2095
- }
2096
- ]
2097
- }
2098
- ]
2099
- }
2100
- },
2101
- {
2102
- "files": [
2103
- "**/eslint.config.ts",
2104
- "**/eslint.config.js"
2105
- ],
2106
- "rules": {
2107
- "no-restricted-exports": "off"
2108
- }
2109
- },
2110
- {
2111
- "files": [
2112
- "**/*.ts",
2113
- "**/*.tsx",
2114
- "**/*.mts",
2115
- "**/*.cts"
2116
- ],
2117
- "rules": {
2118
- "constructor-super": "off",
2119
- "getter-return": "off",
2120
- "no-class-assign": "off",
2121
- "no-const-assign": "off",
2122
- "no-dupe-args": "off",
2123
- "no-dupe-class-members": "off",
2124
- "no-dupe-keys": "off",
2125
- "no-func-assign": "off",
2126
- "no-import-assign": "off",
2127
- "no-new-native-nonconstructor": "off",
2128
- "no-new-symbol": "off",
2129
- "no-obj-calls": "off",
2130
- "no-redeclare": "off",
2131
- "no-setter-return": "off",
2132
- "no-this-before-super": "off",
2133
- "no-undef": "off",
2134
- "no-unreachable": "off",
2135
- "no-unsafe-negation": "off",
2136
- "no-var": "error",
2137
- "no-with": "off",
2138
- "prefer-const": "error",
2139
- "prefer-rest-params": "error",
2140
- "prefer-spread": "error",
2141
- "no-array-constructor": "off",
2142
- "no-unused-expressions": "off",
2143
- "no-unused-vars": "off",
2144
- "@typescript-eslint/no-array-constructor": "error",
2145
- "@typescript-eslint/no-duplicate-enum-values": "error",
2146
- "@typescript-eslint/no-empty-object-type": "error",
2147
- "@typescript-eslint/no-extra-non-null-assertion": "error",
2148
- "@typescript-eslint/no-misused-new": "error",
2149
- "@typescript-eslint/no-namespace": "error",
2150
- "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
2151
- "@typescript-eslint/no-require-imports": "error",
2152
- "@typescript-eslint/no-this-alias": "error",
2153
- "@typescript-eslint/no-unnecessary-type-constraint": "error",
2154
- "@typescript-eslint/no-unsafe-declaration-merging": "error",
2155
- "@typescript-eslint/prefer-as-const": "error",
2156
- "@typescript-eslint/prefer-namespace-keyword": "error",
2157
- "@typescript-eslint/triple-slash-reference": "error",
2158
- "@typescript-eslint/explicit-function-return-type": 0,
2159
- "@typescript-eslint/no-use-before-define": 0,
2160
- "@typescript-eslint/no-empty-function": 0,
2161
- "@typescript-eslint/no-unused-vars": [
2162
- 2,
2163
- {
2164
- "varsIgnorePattern": "^_.*$",
2165
- "argsIgnorePattern": "^_.*$"
2166
- }
2167
- ],
2168
- "@typescript-eslint/no-explicit-any": "error",
2169
- "@typescript-eslint/array-type": "off",
2170
- "@typescript-eslint/ban-ts-comment": [
2171
- "error",
2172
- {
2173
- "ts-expect-error": "allow-with-description"
2174
- }
2175
- ],
2176
- "@typescript-eslint/no-wrapper-object-types": "error",
2177
- "@typescript-eslint/no-unsafe-function-type": "error",
2178
- "@typescript-eslint/no-restricted-types": [
2179
- "error",
2180
- {
2181
- "types": {
2182
- "String": {
2183
- "message": "Use 'string' instead",
2184
- "fixWith": "string"
2185
- },
2186
- "Number": {
2187
- "message": "Use 'number' instead",
2188
- "fixWith": "number"
2189
- },
2190
- "Boolean": {
2191
- "message": "Use 'boolean' instead",
2192
- "fixWith": "boolean"
2193
- },
2194
- "Symbol": {
2195
- "message": "Use 'symbol' instead",
2196
- "fixWith": "symbol"
2197
- }
2198
- }
2199
- }
2200
- ],
2201
- "@typescript-eslint/explicit-member-accessibility": "off",
2202
- "@typescript-eslint/interface-name-prefix": "off",
2203
- "@typescript-eslint/member-ordering": "off",
2204
- "@typescript-eslint/no-inferrable-types": "off",
2205
- "@typescript-eslint/no-non-null-assertion": "off",
2206
- "no-restricted-syntax": [
2207
- "error",
2208
- {
2209
- "selector": "MemberExpression[object.name='React']",
2210
- "message": "Do not use `React.*`. Use named imports instead."
2211
- },
2212
- {
2213
- "selector": "TSTypeReference[typeName.type='TSQualifiedName'][typeName.left.name='React']",
2214
- "message": "Do not use `React.*` types. Use named imports instead."
2215
- },
2216
- {
2217
- "selector": "ExportNamespaceSpecifier",
2218
- "message": "Usage of 'export * as …' is forbidden."
2219
- },
2220
- {
2221
- "selector": "ExportAllDeclaration",
2222
- "message": "Usage of `export * from` is forbidden."
2223
- },
2224
- {
2225
- "selector": "ImportDeclaration[source.value=/^(?!.*reference_workspace)\\./] ImportNamespaceSpecifier",
2226
- "message": "Do not use `import * as ...` from relative paths."
2227
- }
2228
- ],
2229
- "@typescript-eslint/consistent-type-imports": [
2230
- "error",
2231
- {
2232
- "prefer": "type-imports",
2233
- "fixStyle": "inline-type-imports"
2234
- }
2235
- ],
2236
- "@typescript-eslint/prefer-optional-chain": "error",
2237
- "@typescript-eslint/consistent-type-exports": [
2238
- "error",
2239
- {
2240
- "fixMixedExportsWithInlineTypeSpecifier": false
2241
- }
2242
- ],
2243
- "@typescript-eslint/naming-convention": [
2244
- "error",
2245
- {
2246
- "selector": "interface",
2247
- "format": [
2248
- "PascalCase"
2249
- ],
2250
- "custom": {
2251
- "regex": "^I[A-Z]",
2252
- "match": true
2253
- }
2254
- }
2255
- ]
2256
- },
2257
- "parser": "@typescript-eslint/parser",
2258
- "parserOptions": {
2259
- "ecmaVersion": 2022,
2260
- "sourceType": "module",
2261
- "projectService": true
2262
- }
2263
- },
2264
- {
2265
- "files": [
2266
- "**/eslint.config.ts"
2267
- ],
2268
- "rules": {
2269
- "no-barrel-files/no-barrel-files": "off"
2270
- }
2271
- },
2272
- {
2273
- "files": [
2274
- "**/*.ts",
2275
- "**/*.cts",
2276
- "**/*.mts",
2277
- "**/*.tsx"
2278
- ],
2279
- "settings": {
2280
- "import-x/extensions": [
2281
- ".ts",
2282
- ".cts",
2283
- ".mts",
2284
- ".tsx",
2285
- ".js",
2286
- ".jsx",
2287
- ".mjs",
2288
- ".cjs"
2289
- ],
2290
- "import-x/external-module-folders": [
2291
- "node_modules",
2292
- "node_modules/@types"
2293
- ],
2294
- "import-x/parsers": {
2295
- "@typescript-eslint/parser": [
2296
- ".ts",
2297
- ".cts",
2298
- ".mts",
2299
- ".tsx"
2300
- ]
2301
- },
2302
- "import-x/resolver": {
2303
- "typescript": {
2304
- "alwaysTryTypes": true
2305
- }
2306
- }
2307
- }
2308
- },
2309
- {
2310
- "files": [
2311
- "**/*.{js,cjs,mjs,jsx}"
2312
- ],
2313
- "plugins": [
2314
- "jsdoc"
2315
- ],
2316
- "settings": {
2317
- "jsdoc": {
2318
- "mode": "jsdoc"
2319
- }
2320
- },
2321
- "rules": {
2322
- "jsdoc/require-param": "error"
2323
- }
2324
- },
2325
- {
2326
- "files": [
2327
- "*.test.ts",
2328
- "*.test.tsx",
2329
- "*.spec.ts"
2330
- ],
2331
- "rules": {
2332
- "sonarjs/no-identical-functions": "off"
2333
- }
2334
- },
2335
- {
2336
- "parser": "@typescript-eslint/parser",
2337
- "files": [
2338
- "**/*.ts",
2339
- "**/*.tsx"
2340
- ],
2341
- "rules": {
2342
- "@typescript-eslint/no-unused-expressions": "off"
2343
- }
2344
- }
2345
- ],
2346
- "settings": {
2347
- "import-x/extensions": [
2348
- ".js",
2349
- ".jsx",
2350
- ".mjs",
2351
- ".cjs"
2352
- ]
2353
- },
2354
- "env": {
2355
- "node": true,
2356
- "es2022": true,
2357
- "browser": true
2358
- },
2359
- "ignorePatterns": [
2360
- "**/dist/**/*.*",
2361
- "**/esm/**/*.*",
2362
- "**/node_modules/**/*.*",
2363
- "**/ci/results/**",
2364
- "**/__version.ts",
2365
- "**/cypress/results/**",
2366
- "**/cypress/screenshots/**",
2367
- "**/cypress/videos/**",
2368
- "**/temp/**",
2369
- "**/reference_workspace/**"
2370
- ],
2371
- "parserOptions": {
2372
- "ecmaVersion": 2022,
2373
- "sourceType": "module"
2374
- }
2375
- }