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