@gooddata/eslint-config 11.19.0-alpha.1 → 11.19.0-alpha.3

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