@gooddata/eslint-config 11.19.0-alpha.0 → 11.19.0-alpha.10

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