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