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