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