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