@gooddata/eslint-config 11.19.0-alpha.9 → 11.20.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/PACKAGES_V8.md +1 -2
  2. package/PACKAGES_V9.md +1 -1
  3. package/PACKAGES_V9_OXLINT.md +21 -0
  4. package/README.md +22 -0
  5. package/dist/base.js +792 -283
  6. package/dist/base.json +1049 -213
  7. package/dist/browser-esm.js +794 -285
  8. package/dist/browser-esm.json +1051 -215
  9. package/dist/browser.js +792 -283
  10. package/dist/browser.json +1049 -213
  11. package/dist/esm-react-cypress.js +715 -187
  12. package/dist/esm-react-cypress.json +1051 -204
  13. package/dist/esm-react-vitest-storybook.js +825 -297
  14. package/dist/esm-react-vitest-storybook.json +1076 -204
  15. package/dist/esm-react-vitest.js +825 -297
  16. package/dist/esm-react-vitest.json +1060 -204
  17. package/dist/esm-react.js +798 -289
  18. package/dist/esm-react.json +1051 -216
  19. package/dist/esm-vitest.js +821 -293
  20. package/dist/esm-vitest.json +1060 -203
  21. package/dist/esm.js +794 -285
  22. package/dist/esm.json +1051 -215
  23. package/dist/oxlint-base.d.ts +12 -0
  24. package/dist/oxlint-base.js +1368 -0
  25. package/dist/oxlint-browser-esm.d.ts +12 -0
  26. package/dist/oxlint-browser-esm.js +1379 -0
  27. package/dist/oxlint-browser.d.ts +12 -0
  28. package/dist/oxlint-browser.js +1373 -0
  29. package/dist/oxlint-esm-react-cypress.d.ts +12 -0
  30. package/dist/oxlint-esm-react-cypress.js +1425 -0
  31. package/dist/oxlint-esm-react-vitest-storybook.d.ts +12 -0
  32. package/dist/oxlint-esm-react-vitest-storybook.js +1484 -0
  33. package/dist/oxlint-esm-react-vitest.d.ts +12 -0
  34. package/dist/oxlint-esm-react-vitest.js +1450 -0
  35. package/dist/oxlint-esm-react.d.ts +12 -0
  36. package/dist/oxlint-esm-react.js +1425 -0
  37. package/dist/oxlint-esm-vitest.d.ts +12 -0
  38. package/dist/oxlint-esm-vitest.js +1399 -0
  39. package/dist/oxlint-esm.d.ts +12 -0
  40. package/dist/oxlint-esm.js +1374 -0
  41. package/dist/oxlint-react-cypress.d.ts +12 -0
  42. package/dist/oxlint-react-cypress.js +1425 -0
  43. package/dist/oxlint-react-vitest.d.ts +12 -0
  44. package/dist/oxlint-react-vitest.js +1450 -0
  45. package/dist/oxlint-react.d.ts +12 -0
  46. package/dist/oxlint-react.js +1425 -0
  47. package/dist/oxlint-vitest.d.ts +12 -0
  48. package/dist/oxlint-vitest.js +1393 -0
  49. package/dist/react-cypress.js +713 -185
  50. package/dist/react-cypress.json +1050 -203
  51. package/dist/react-vitest.js +823 -295
  52. package/dist/react-vitest.json +1059 -203
  53. package/dist/react.js +796 -287
  54. package/dist/react.json +1049 -214
  55. package/dist/vitest.js +819 -291
  56. package/dist/vitest.json +1059 -202
  57. package/package.json +40 -6
@@ -3,51 +3,73 @@
3
3
  "header",
4
4
  "no-barrel-files",
5
5
  "import-x",
6
- "no-only-tests",
7
6
  "sonarjs",
8
7
  "react",
9
8
  "react-hooks",
10
9
  "import-esm",
11
10
  "@vitest",
11
+ "no-only-tests",
12
12
  "storybook"
13
13
  ],
14
- "extends": [
15
- "eslint:recommended",
16
- "plugin:import-x/recommended",
17
- "plugin:regexp/recommended",
18
- "plugin:sonarjs/recommended-legacy",
19
- "plugin:react-hooks/recommended-legacy",
20
- "plugin:import-esm/recommended",
21
- "plugin:@vitest/legacy-recommended"
22
- ],
23
14
  "rules": {
24
- "no-console": [
25
- 2,
26
- {
27
- "allow": [
28
- "warn",
29
- "error"
30
- ]
31
- }
32
- ],
33
- "no-restricted-exports": [
34
- 2,
35
- {
36
- "restrictDefaultExports": {
37
- "direct": true,
38
- "named": true,
39
- "defaultFrom": true,
40
- "namedFrom": true,
41
- "namespaceFrom": true
42
- }
43
- }
44
- ],
45
- "no-duplicate-imports": [
46
- "error",
47
- {
48
- "includeExports": true
49
- }
50
- ],
15
+ "constructor-super": "error",
16
+ "for-direction": "error",
17
+ "getter-return": "error",
18
+ "no-async-promise-executor": "error",
19
+ "no-case-declarations": "error",
20
+ "no-class-assign": "error",
21
+ "no-compare-neg-zero": "error",
22
+ "no-cond-assign": "error",
23
+ "no-const-assign": "error",
24
+ "no-constant-binary-expression": "error",
25
+ "no-constant-condition": "error",
26
+ "no-control-regex": "error",
27
+ "no-debugger": "error",
28
+ "no-delete-var": 2,
29
+ "no-dupe-args": "error",
30
+ "no-dupe-class-members": "error",
31
+ "no-dupe-else-if": "error",
32
+ "no-dupe-keys": "error",
33
+ "no-duplicate-case": "error",
34
+ "no-empty": "error",
35
+ "no-empty-character-class": "error",
36
+ "no-empty-pattern": "error",
37
+ "no-empty-static-block": "error",
38
+ "no-ex-assign": "error",
39
+ "no-fallthrough": "error",
40
+ "no-func-assign": "error",
41
+ "no-global-assign": "error",
42
+ "no-import-assign": "error",
43
+ "no-invalid-regexp": "error",
44
+ "no-irregular-whitespace": "error",
45
+ "no-loss-of-precision": "error",
46
+ "no-misleading-character-class": "error",
47
+ "no-new-native-nonconstructor": "error",
48
+ "no-nonoctal-decimal-escape": "error",
49
+ "no-obj-calls": "error",
50
+ "no-octal": "error",
51
+ "no-prototype-builtins": "error",
52
+ "no-redeclare": "error",
53
+ "no-regex-spaces": "error",
54
+ "no-self-assign": "error",
55
+ "no-setter-return": "error",
56
+ "no-shadow-restricted-names": "error",
57
+ "no-sparse-arrays": "error",
58
+ "no-this-before-super": "error",
59
+ "no-undef": "error",
60
+ "no-unreachable": "error",
61
+ "no-unsafe-finally": "error",
62
+ "no-unsafe-negation": "error",
63
+ "no-unsafe-optional-chaining": "error",
64
+ "no-unused-labels": "error",
65
+ "no-unused-private-class-members": "error",
66
+ "no-unused-vars": "error",
67
+ "no-useless-backreference": "error",
68
+ "no-useless-catch": "error",
69
+ "no-with": "error",
70
+ "require-yield": "error",
71
+ "use-isnan": "error",
72
+ "valid-typeof": "error",
51
73
  "no-restricted-imports": [
52
74
  "error",
53
75
  {
@@ -568,17 +590,6 @@
568
590
  ]
569
591
  }
570
592
  ],
571
- "no-restricted-syntax": [
572
- "error",
573
- {
574
- "selector": "MemberExpression[object.name='React']",
575
- "message": "Do not use `React.*`. Use named imports instead."
576
- },
577
- {
578
- "selector": "MemberExpression[object.name='ReactDOM']",
579
- "message": "Do not use `ReactDOM.*`. Use named imports instead."
580
- }
581
- ],
582
593
  "sort-imports": [
583
594
  "error",
584
595
  {
@@ -588,7 +599,6 @@
588
599
  }
589
600
  ],
590
601
  "no-useless-escape": "off",
591
- "no-negated-condition": "error",
592
602
  "no-unneeded-ternary": [
593
603
  "error",
594
604
  {
@@ -597,6 +607,46 @@
597
607
  ],
598
608
  "no-extra-boolean-cast": "error",
599
609
  "no-unexpected-multiline": 0,
610
+ "no-duplicate-imports": [
611
+ "error",
612
+ {
613
+ "includeExports": true
614
+ }
615
+ ],
616
+ "prefer-const": "off",
617
+ "no-console": [
618
+ 2,
619
+ {
620
+ "allow": [
621
+ "warn",
622
+ "error"
623
+ ]
624
+ }
625
+ ],
626
+ "no-restricted-exports": [
627
+ 2,
628
+ {
629
+ "restrictDefaultExports": {
630
+ "direct": true,
631
+ "named": true,
632
+ "defaultFrom": true,
633
+ "namedFrom": true,
634
+ "namespaceFrom": true
635
+ }
636
+ }
637
+ ],
638
+ "no-restricted-syntax": [
639
+ "error",
640
+ {
641
+ "selector": "MemberExpression[object.name='React']",
642
+ "message": "Do not use `React.*`. Use named imports instead."
643
+ },
644
+ {
645
+ "selector": "MemberExpression[object.name='ReactDOM']",
646
+ "message": "Do not use `ReactDOM.*`. Use named imports instead."
647
+ }
648
+ ],
649
+ "no-negated-condition": "error",
600
650
  "header/header": [
601
651
  2,
602
652
  "line",
@@ -606,6 +656,14 @@
606
656
  }
607
657
  ],
608
658
  "no-barrel-files/no-barrel-files": "error",
659
+ "import-x/named": "error",
660
+ "import-x/namespace": "error",
661
+ "import-x/default": "error",
662
+ "import-x/export": "error",
663
+ "import-x/no-named-as-default": "warn",
664
+ "import-x/no-named-as-default-member": "warn",
665
+ "import-x/no-duplicates": "warn",
666
+ "import-x/no-unassigned-import": "error",
609
667
  "import-x/order": [
610
668
  "error",
611
669
  {
@@ -641,20 +699,210 @@
641
699
  "newlines-between": "always"
642
700
  }
643
701
  ],
644
- "import-x/no-unassigned-import": "error",
645
- "no-only-tests/no-only-tests": [
646
- "error",
647
- {
648
- "block": [
649
- "fixture"
650
- ],
651
- "focus": [
652
- "only"
653
- ]
654
- }
655
- ],
656
- "regexp/prefer-d": "off",
657
- "regexp/prefer-w": "off",
702
+ "sonarjs/function-name": "off",
703
+ "sonarjs/max-lines": "off",
704
+ "sonarjs/no-tab": "off",
705
+ "sonarjs/variable-name": "off",
706
+ "sonarjs/comment-regex": "off",
707
+ "sonarjs/elseif-without-else": "off",
708
+ "sonarjs/no-fallthrough": "error",
709
+ "sonarjs/nested-control-flow": "off",
710
+ "sonarjs/too-many-break-or-continue-in-loop": "off",
711
+ "sonarjs/max-lines-per-function": "off",
712
+ "sonarjs/no-nested-incdec": "off",
713
+ "sonarjs/no-equals-in-for-termination": "error",
714
+ "sonarjs/no-extra-arguments": "error",
715
+ "sonarjs/no-collapsible-if": "off",
716
+ "sonarjs/expression-complexity": "off",
717
+ "sonarjs/no-redundant-parentheses": "off",
718
+ "sonarjs/no-labels": "error",
719
+ "sonarjs/no-redundant-boolean": "error",
720
+ "sonarjs/prefer-single-boolean-return": "error",
721
+ "sonarjs/unused-import": "error",
722
+ "sonarjs/useless-string-operation": "off",
723
+ "sonarjs/no-unused-function-argument": "off",
724
+ "sonarjs/no-case-label-in-switch": "error",
725
+ "sonarjs/no-parameter-reassignment": "error",
726
+ "sonarjs/prefer-while": "error",
727
+ "sonarjs/no-sonar-comments": "off",
728
+ "sonarjs/no-small-switch": "error",
729
+ "sonarjs/no-hardcoded-ip": "error",
730
+ "sonarjs/label-position": "error",
731
+ "sonarjs/file-header": "off",
732
+ "sonarjs/call-argument-line": "error",
733
+ "sonarjs/max-switch-cases": "error",
734
+ "sonarjs/prefer-immediate-return": "off",
735
+ "sonarjs/function-inside-loop": "error",
736
+ "sonarjs/no-variable-usage-before-declaration": "off",
737
+ "sonarjs/future-reserved-words": "error",
738
+ "sonarjs/array-constructor": "off",
739
+ "sonarjs/bitwise-operators": "error",
740
+ "sonarjs/no-function-declaration-in-block": "off",
741
+ "sonarjs/no-primitive-wrappers": "error",
742
+ "sonarjs/for-in": "off",
743
+ "sonarjs/cyclomatic-complexity": "off",
744
+ "sonarjs/no-identical-expressions": "error",
745
+ "sonarjs/no-nested-switch": "off",
746
+ "sonarjs/no-identical-conditions": "error",
747
+ "sonarjs/no-duplicated-branches": "error",
748
+ "sonarjs/misplaced-loop-counter": "error",
749
+ "sonarjs/sql-queries": "error",
750
+ "sonarjs/insecure-cookie": "error",
751
+ "sonarjs/no-useless-increment": "error",
752
+ "sonarjs/no-undefined-assignment": "off",
753
+ "sonarjs/no-wildcard-import": "off",
754
+ "sonarjs/for-loop-increment-sign": "error",
755
+ "sonarjs/cookies": "off",
756
+ "sonarjs/null-dereference": "error",
757
+ "sonarjs/updated-loop-counter": "error",
758
+ "sonarjs/block-scoped-var": "error",
759
+ "sonarjs/no-built-in-override": "off",
760
+ "sonarjs/prefer-object-literal": "off",
761
+ "sonarjs/no-gratuitous-expressions": "error",
762
+ "sonarjs/file-uploads": "error",
763
+ "sonarjs/file-permissions": "error",
764
+ "sonarjs/no-empty-character-class": "error",
765
+ "sonarjs/no-unenclosed-multiline-block": "error",
766
+ "sonarjs/index-of-compare-to-positive-number": "error",
767
+ "sonarjs/no-useless-catch": "error",
768
+ "sonarjs/xml-parser-xxe": "error",
769
+ "sonarjs/non-existent-operator": "error",
770
+ "sonarjs/web-sql-database": "off",
771
+ "sonarjs/no-array-delete": "error",
772
+ "sonarjs/no-incomplete-assertions": "error",
773
+ "sonarjs/no-global-this": "error",
774
+ "sonarjs/new-operator-misuse": "error",
775
+ "sonarjs/no-delete-var": "error",
776
+ "sonarjs/strings-comparison": "off",
777
+ "sonarjs/file-name-differ-from-class": "off",
778
+ "sonarjs/cookie-no-httponly": "error",
779
+ "sonarjs/no-incorrect-string-concat": "off",
780
+ "sonarjs/inverted-assertion-arguments": "error",
781
+ "sonarjs/shorthand-property-grouping": "off",
782
+ "sonarjs/updated-const-var": "error",
783
+ "sonarjs/arguments-usage": "off",
784
+ "sonarjs/destructuring-assignment-syntax": "off",
785
+ "sonarjs/arrow-function-convention": "off",
786
+ "sonarjs/class-prototype": "off",
787
+ "sonarjs/no-require-or-define": "off",
788
+ "sonarjs/no-associative-arrays": "error",
789
+ "sonarjs/comma-or-logical-or-case": "error",
790
+ "sonarjs/no-redundant-jump": "error",
791
+ "sonarjs/inconsistent-function-call": "error",
792
+ "sonarjs/no-use-of-empty-return-value": "error",
793
+ "sonarjs/enforce-trailing-comma": "off",
794
+ "sonarjs/operation-returning-nan": "off",
795
+ "sonarjs/values-not-convertible-to-numbers": "off",
796
+ "sonarjs/non-number-in-arithmetic-expression": "off",
797
+ "sonarjs/in-operator-type-error": "error",
798
+ "sonarjs/declarations-in-global-scope": "off",
799
+ "sonarjs/no-inconsistent-returns": "off",
800
+ "sonarjs/no-reference-error": "off",
801
+ "sonarjs/super-invocation": "error",
802
+ "sonarjs/no-all-duplicated-branches": "error",
803
+ "sonarjs/no-same-line-conditional": "error",
804
+ "sonarjs/conditional-indentation": "off",
805
+ "sonarjs/no-collection-size-mischeck": "error",
806
+ "sonarjs/no-unthrown-error": "error",
807
+ "sonarjs/no-unused-collection": "error",
808
+ "sonarjs/no-for-in-iterable": "off",
809
+ "sonarjs/no-element-overwrite": "error",
810
+ "sonarjs/no-identical-functions": "error",
811
+ "sonarjs/no-empty-collection": "error",
812
+ "sonarjs/no-redundant-assignments": "error",
813
+ "sonarjs/prefer-type-guard": "error",
814
+ "sonarjs/no-return-type-any": "off",
815
+ "sonarjs/no-implicit-dependencies": "off",
816
+ "sonarjs/weak-ssl": "error",
817
+ "sonarjs/no-weak-keys": "error",
818
+ "sonarjs/csrf": "error",
819
+ "sonarjs/production-debug": "error",
820
+ "sonarjs/no-in-misuse": "error",
821
+ "sonarjs/no-duplicate-in-composite": "error",
822
+ "sonarjs/max-union-size": "off",
823
+ "sonarjs/no-nested-template-literals": "error",
824
+ "sonarjs/regular-expr": "off",
825
+ "sonarjs/encryption": "off",
826
+ "sonarjs/hashing": "error",
827
+ "sonarjs/bool-param-default": "off",
828
+ "sonarjs/xpath": "off",
829
+ "sonarjs/sockets": "off",
830
+ "sonarjs/process-argv": "off",
831
+ "sonarjs/standard-input": "off",
832
+ "sonarjs/unverified-certificate": "error",
833
+ "sonarjs/cors": "error",
834
+ "sonarjs/disabled-auto-escaping": "error",
835
+ "sonarjs/no-table-as-layout": "error",
836
+ "sonarjs/table-header-reference": "error",
837
+ "sonarjs/object-alt-content": "error",
838
+ "sonarjs/publicly-writable-directories": "error",
839
+ "sonarjs/unverified-hostname": "error",
840
+ "sonarjs/encryption-secure-mode": "error",
841
+ "sonarjs/no-weak-cipher": "error",
842
+ "sonarjs/no-intrusive-permissions": "error",
843
+ "sonarjs/insecure-jwt-token": "error",
844
+ "sonarjs/x-powered-by": "error",
845
+ "sonarjs/hidden-files": "error",
846
+ "sonarjs/content-length": "error",
847
+ "sonarjs/disabled-resource-integrity": "error",
848
+ "sonarjs/content-security-policy": "error",
849
+ "sonarjs/no-mixed-content": "error",
850
+ "sonarjs/frame-ancestors": "error",
851
+ "sonarjs/no-mime-sniff": "error",
852
+ "sonarjs/no-referrer-policy": "error",
853
+ "sonarjs/strict-transport-security": "error",
854
+ "sonarjs/certificate-transparency": "off",
855
+ "sonarjs/dns-prefetching": "off",
856
+ "sonarjs/confidential-information-logging": "error",
857
+ "sonarjs/no-ip-forward": "error",
858
+ "sonarjs/no-invalid-regexp": "error",
859
+ "sonarjs/unused-named-groups": "error",
860
+ "sonarjs/no-same-argument-assert": "error",
861
+ "sonarjs/unicode-aware-regex": "off",
862
+ "sonarjs/no-misleading-character-class": "error",
863
+ "sonarjs/session-regeneration": "error",
864
+ "sonarjs/test-check-exception": "error",
865
+ "sonarjs/stable-tests": "error",
866
+ "sonarjs/no-empty-after-reluctant": "error",
867
+ "sonarjs/no-code-after-done": "error",
868
+ "sonarjs/disabled-timeout": "error",
869
+ "sonarjs/chai-determinate-assertion": "error",
870
+ "sonarjs/aws-s3-bucket-server-encryption": "off",
871
+ "sonarjs/aws-s3-bucket-insecure-http": "error",
872
+ "sonarjs/aws-s3-bucket-versioning": "error",
873
+ "sonarjs/aws-s3-bucket-granted-access": "error",
874
+ "sonarjs/no-angular-bypass-sanitization": "error",
875
+ "sonarjs/aws-iam-public-access": "error",
876
+ "sonarjs/aws-ec2-unencrypted-ebs-volume": "error",
877
+ "sonarjs/aws-s3-bucket-public-access": "error",
878
+ "sonarjs/no-vue-bypass-sanitization": "off",
879
+ "sonarjs/aws-iam-all-privileges": "error",
880
+ "sonarjs/aws-rds-unencrypted-databases": "error",
881
+ "sonarjs/aws-iam-all-resources-accessible": "off",
882
+ "sonarjs/aws-opensearchservice-domain": "error",
883
+ "sonarjs/aws-iam-privilege-escalation": "error",
884
+ "sonarjs/aws-sagemaker-unencrypted-notebook": "error",
885
+ "sonarjs/aws-restricted-ip-admin-access": "error",
886
+ "sonarjs/no-empty-alternatives": "error",
887
+ "sonarjs/no-regex-spaces": "error",
888
+ "sonarjs/aws-sns-unencrypted-topics": "error",
889
+ "sonarjs/existing-groups": "error",
890
+ "sonarjs/aws-ec2-rds-dms-public": "error",
891
+ "sonarjs/aws-sqs-unencrypted-queue": "error",
892
+ "sonarjs/no-empty-group": "error",
893
+ "sonarjs/aws-efs-unencrypted": "error",
894
+ "sonarjs/aws-apigateway-public-api": "error",
895
+ "sonarjs/stateful-regex": "error",
896
+ "sonarjs/single-char-in-character-classes": "error",
897
+ "sonarjs/no-exclusive-tests": "error",
898
+ "sonarjs/hardcoded-secret-signatures": "error",
899
+ "sonarjs/jsx-no-leaked-render": "error",
900
+ "sonarjs/no-hook-setter-in-body": "error",
901
+ "sonarjs/no-uniq-key": "error",
902
+ "sonarjs/no-internal-api-use": "error",
903
+ "sonarjs/no-literal-call": "error",
904
+ "sonarjs/review-blockchain-mnemonic": "error",
905
+ "sonarjs/dynamically-constructed-templates": "error",
658
906
  "sonarjs/no-duplicate-string": "off",
659
907
  "sonarjs/cognitive-complexity": "warn",
660
908
  "sonarjs/todo-tag": "warn",
@@ -722,7 +970,6 @@
722
970
  "sonarjs/no-control-regex": "off",
723
971
  "no-caller": 2,
724
972
  "no-eval": 2,
725
- "no-delete-var": 2,
726
973
  "no-octal-escape": 2,
727
974
  "curly": 0,
728
975
  "@typescript-eslint/lines-around-comment": 0,
@@ -788,13 +1035,35 @@
788
1035
  "react/react-in-jsx-scope": "off",
789
1036
  "react-hooks/rules-of-hooks": "error",
790
1037
  "react-hooks/exhaustive-deps": "error",
1038
+ "import-esm/explicit-extension": "error",
1039
+ "@vitest/no-conditional-expect": "error",
1040
+ "@vitest/no-import-node-test": "error",
1041
+ "@vitest/no-interpolation-in-snapshots": "error",
1042
+ "@vitest/no-mocks-import": "error",
1043
+ "@vitest/no-standalone-expect": "error",
1044
+ "@vitest/no-unneeded-async-expect-function": "error",
1045
+ "@vitest/prefer-called-exactly-once-with": "error",
1046
+ "@vitest/require-local-test-context-for-concurrent-snapshots": "error",
1047
+ "@vitest/valid-describe-callback": "error",
1048
+ "@vitest/valid-expect-in-promise": "error",
791
1049
  "@vitest/expect-expect": "off",
792
1050
  "@vitest/no-commented-out-tests": "warn",
793
1051
  "@vitest/valid-title": "error",
794
1052
  "@vitest/no-disabled-tests": "warn",
795
1053
  "@vitest/no-focused-tests": "warn",
796
1054
  "@vitest/no-identical-title": "warn",
797
- "@vitest/valid-expect": "warn"
1055
+ "@vitest/valid-expect": "warn",
1056
+ "no-only-tests/no-only-tests": [
1057
+ "error",
1058
+ {
1059
+ "block": [
1060
+ "fixture"
1061
+ ],
1062
+ "focus": [
1063
+ "only"
1064
+ ]
1065
+ }
1066
+ ]
798
1067
  },
799
1068
  "overrides": [
800
1069
  {
@@ -802,18 +1071,6 @@
802
1071
  "**/*.ts",
803
1072
  "**/*.tsx"
804
1073
  ],
805
- "excludedFiles": [
806
- "**/vitest.config.ts",
807
- "**/vitest.*.config.ts",
808
- "**/vitest.setup.ts",
809
- "**/vitest.setup.tsx",
810
- "**/*.test.ts",
811
- "**/*.test.tsx",
812
- "**/*.test.utils.ts",
813
- "**/*.test.utils.tsx",
814
- "**/*.test.helpers.ts",
815
- "**/*.test.helpers.tsx"
816
- ],
817
1074
  "rules": {
818
1075
  "no-restricted-imports": [
819
1076
  "error",
@@ -1345,119 +1602,666 @@
1345
1602
  },
1346
1603
  {
1347
1604
  "files": [
1348
- "**/eslint.config.ts",
1349
- "**/eslint.config.js"
1350
- ],
1351
- "rules": {
1352
- "no-restricted-exports": "off"
1353
- }
1354
- },
1355
- {
1356
- "parser": "@typescript-eslint/parser",
1357
- "files": [
1358
- "**/*.ts",
1359
- "**/*.tsx",
1360
- "**/*.mts",
1361
- "**/*.cts"
1362
- ],
1363
- "extends": [
1364
- "plugin:@typescript-eslint/recommended-type-checked"
1605
+ "**/vitest.config.ts",
1606
+ "**/vitest.*.config.ts",
1607
+ "**/vitest.setup.ts",
1608
+ "**/vitest.setup.tsx",
1609
+ "**/*.test.ts",
1610
+ "**/*.test.tsx",
1611
+ "**/*.test.utils.ts",
1612
+ "**/*.test.utils.tsx",
1613
+ "**/*.test.helpers.ts",
1614
+ "**/*.test.helpers.tsx"
1365
1615
  ],
1366
- "parserOptions": {
1367
- "ecmaVersion": 2022,
1368
- "sourceType": "module",
1369
- "projectService": true
1370
- },
1371
1616
  "rules": {
1372
- "@typescript-eslint/explicit-function-return-type": 0,
1373
- "@typescript-eslint/no-use-before-define": 0,
1374
- "@typescript-eslint/no-empty-function": 0,
1375
- "@typescript-eslint/naming-convention": [
1376
- "error",
1377
- {
1378
- "selector": "interface",
1379
- "format": [
1380
- "PascalCase"
1381
- ],
1382
- "custom": {
1383
- "regex": "^I[A-Z]",
1384
- "match": true
1385
- }
1386
- }
1387
- ],
1388
- "@typescript-eslint/no-unused-vars": [
1389
- 2,
1390
- {
1391
- "varsIgnorePattern": "^_.*$",
1392
- "argsIgnorePattern": "^_.*$"
1393
- }
1394
- ],
1395
- "@typescript-eslint/no-explicit-any": "error",
1396
- "@typescript-eslint/array-type": "off",
1397
- "@typescript-eslint/ban-ts-comment": [
1398
- "error",
1399
- {
1400
- "ts-expect-error": "allow-with-description"
1401
- }
1402
- ],
1403
- "@typescript-eslint/no-wrapper-object-types": "error",
1404
- "@typescript-eslint/no-unsafe-function-type": "error",
1405
- "@typescript-eslint/no-restricted-types": [
1617
+ "no-restricted-imports": [
1406
1618
  "error",
1407
1619
  {
1408
- "types": {
1409
- "String": {
1410
- "message": "Use 'string' instead",
1411
- "fixWith": "string"
1620
+ "paths": [
1621
+ {
1622
+ "name": "react",
1623
+ "importNames": [
1624
+ "default"
1625
+ ],
1626
+ "message": "Default import from React is not allowed. Use named imports instead."
1412
1627
  },
1413
- "Number": {
1414
- "message": "Use 'number' instead",
1415
- "fixWith": "number"
1628
+ {
1629
+ "name": "react-dom",
1630
+ "importNames": [
1631
+ "default"
1632
+ ],
1633
+ "message": "Default import from React DOM is not allowed. Use named imports instead."
1416
1634
  },
1417
- "Boolean": {
1418
- "message": "Use 'boolean' instead",
1419
- "fixWith": "boolean"
1635
+ {
1636
+ "name": "@gooddata/sdk-ui-kit",
1637
+ "importNames": [
1638
+ "Icon"
1639
+ ],
1640
+ "message": "The Icon export cannot be tree-shaken, use {IconName}Icon imports instead."
1420
1641
  },
1421
- "Symbol": {
1422
- "message": "Use 'symbol' instead",
1423
- "fixWith": "symbol"
1642
+ {
1643
+ "name": "vitest",
1644
+ "importNames": [
1645
+ "test"
1646
+ ],
1647
+ "message": "Use 'it' instead of 'test' for consistency."
1424
1648
  }
1425
- }
1426
- }
1427
- ],
1428
- "@typescript-eslint/consistent-type-exports": [
1429
- "error",
1430
- {
1431
- "fixMixedExportsWithInlineTypeSpecifier": false
1432
- }
1433
- ],
1434
- "@typescript-eslint/explicit-member-accessibility": "off",
1435
- "@typescript-eslint/interface-name-prefix": "off",
1436
- "@typescript-eslint/member-ordering": "off",
1437
- "@typescript-eslint/no-inferrable-types": "off",
1438
- "@typescript-eslint/no-non-null-assertion": "off",
1439
- "@typescript-eslint/prefer-optional-chain": "error",
1440
- "no-restricted-syntax": [
1441
- "error",
1442
- {
1443
- "selector": "MemberExpression[object.name='React']",
1444
- "message": "Do not use `React.*`. Use named imports instead."
1445
- },
1446
- {
1447
- "selector": "TSTypeReference[typeName.type='TSQualifiedName'][typeName.left.name='React']",
1448
- "message": "Do not use `React.*` types. Use named imports instead."
1449
- },
1450
- {
1451
- "selector": "ExportNamespaceSpecifier",
1452
- "message": "Usage of 'export * as …' is forbidden."
1453
- },
1454
- {
1455
- "selector": "ExportAllDeclaration",
1456
- "message": "Usage of `export * from` is forbidden."
1457
- },
1458
- {
1459
- "selector": "ImportDeclaration[source.value=/^(?!.*reference_workspace)\\./] ImportNamespaceSpecifier",
1460
- "message": "Do not use `import * as ...` from relative paths."
1649
+ ],
1650
+ "patterns": [
1651
+ {
1652
+ "group": [
1653
+ "lodash-es"
1654
+ ],
1655
+ "importNames": [
1656
+ "get",
1657
+ "getOr"
1658
+ ],
1659
+ "message": "Please use the ?. and ?? operators instead."
1660
+ },
1661
+ {
1662
+ "group": [
1663
+ "lodash-es"
1664
+ ],
1665
+ "importNames": [
1666
+ "keys"
1667
+ ],
1668
+ "message": "Please use Object.keys() instead."
1669
+ },
1670
+ {
1671
+ "group": [
1672
+ "lodash-es"
1673
+ ],
1674
+ "importNames": [
1675
+ "values"
1676
+ ],
1677
+ "message": "Please use Object.values() instead."
1678
+ },
1679
+ {
1680
+ "group": [
1681
+ "lodash-es"
1682
+ ],
1683
+ "importNames": [
1684
+ "entries",
1685
+ "toPairs"
1686
+ ],
1687
+ "message": "Please use Object.entries() instead."
1688
+ },
1689
+ {
1690
+ "group": [
1691
+ "lodash-es"
1692
+ ],
1693
+ "importNames": [
1694
+ "map"
1695
+ ],
1696
+ "message": "Please use Array.prototype.map() instead."
1697
+ },
1698
+ {
1699
+ "group": [
1700
+ "lodash-es"
1701
+ ],
1702
+ "importNames": [
1703
+ "flatMap"
1704
+ ],
1705
+ "message": "Please use Array.prototype.flatMap() instead."
1706
+ },
1707
+ {
1708
+ "group": [
1709
+ "lodash-es"
1710
+ ],
1711
+ "importNames": [
1712
+ "filter"
1713
+ ],
1714
+ "message": "Please use Array.prototype.filter() instead."
1715
+ },
1716
+ {
1717
+ "group": [
1718
+ "lodash-es"
1719
+ ],
1720
+ "importNames": [
1721
+ "find"
1722
+ ],
1723
+ "message": "Please use Array.prototype.find() instead."
1724
+ },
1725
+ {
1726
+ "group": [
1727
+ "lodash-es"
1728
+ ],
1729
+ "importNames": [
1730
+ "findIndex"
1731
+ ],
1732
+ "message": "Please use Array.prototype.findIndex() instead."
1733
+ },
1734
+ {
1735
+ "group": [
1736
+ "lodash-es"
1737
+ ],
1738
+ "importNames": [
1739
+ "includes"
1740
+ ],
1741
+ "message": "Please use Array.prototype.includes() instead."
1742
+ },
1743
+ {
1744
+ "group": [
1745
+ "lodash-es"
1746
+ ],
1747
+ "importNames": [
1748
+ "some"
1749
+ ],
1750
+ "message": "Please use Array.prototype.some() instead."
1751
+ },
1752
+ {
1753
+ "group": [
1754
+ "lodash-es"
1755
+ ],
1756
+ "importNames": [
1757
+ "every"
1758
+ ],
1759
+ "message": "Please use Array.prototype.every() instead."
1760
+ },
1761
+ {
1762
+ "group": [
1763
+ "lodash-es"
1764
+ ],
1765
+ "importNames": [
1766
+ "concat"
1767
+ ],
1768
+ "message": "Please use Array.prototype.concat() or spread [...arr1, ...arr2] instead."
1769
+ },
1770
+ {
1771
+ "group": [
1772
+ "lodash-es"
1773
+ ],
1774
+ "importNames": [
1775
+ "reverse"
1776
+ ],
1777
+ "message": "Please use Array.prototype.reverse() instead."
1778
+ },
1779
+ {
1780
+ "group": [
1781
+ "lodash-es"
1782
+ ],
1783
+ "importNames": [
1784
+ "slice"
1785
+ ],
1786
+ "message": "Please use Array.prototype.slice() instead."
1787
+ },
1788
+ {
1789
+ "group": [
1790
+ "lodash-es"
1791
+ ],
1792
+ "importNames": [
1793
+ "indexOf"
1794
+ ],
1795
+ "message": "Please use Array.prototype.indexOf() instead."
1796
+ },
1797
+ {
1798
+ "group": [
1799
+ "lodash-es"
1800
+ ],
1801
+ "importNames": [
1802
+ "lastIndexOf"
1803
+ ],
1804
+ "message": "Please use Array.prototype.lastIndexOf() instead."
1805
+ },
1806
+ {
1807
+ "group": [
1808
+ "lodash-es"
1809
+ ],
1810
+ "importNames": [
1811
+ "fill"
1812
+ ],
1813
+ "message": "Please use Array.prototype.fill() instead."
1814
+ },
1815
+ {
1816
+ "group": [
1817
+ "lodash-es"
1818
+ ],
1819
+ "importNames": [
1820
+ "startsWith"
1821
+ ],
1822
+ "message": "Please use String.prototype.startsWith() instead."
1823
+ },
1824
+ {
1825
+ "group": [
1826
+ "lodash-es"
1827
+ ],
1828
+ "importNames": [
1829
+ "endsWith"
1830
+ ],
1831
+ "message": "Please use String.prototype.endsWith() instead."
1832
+ },
1833
+ {
1834
+ "group": [
1835
+ "lodash-es"
1836
+ ],
1837
+ "importNames": [
1838
+ "repeat"
1839
+ ],
1840
+ "message": "Please use String.prototype.repeat() instead."
1841
+ },
1842
+ {
1843
+ "group": [
1844
+ "lodash-es"
1845
+ ],
1846
+ "importNames": [
1847
+ "padStart"
1848
+ ],
1849
+ "message": "Please use String.prototype.padStart() instead."
1850
+ },
1851
+ {
1852
+ "group": [
1853
+ "lodash-es"
1854
+ ],
1855
+ "importNames": [
1856
+ "padEnd"
1857
+ ],
1858
+ "message": "Please use String.prototype.padEnd() instead."
1859
+ },
1860
+ {
1861
+ "group": [
1862
+ "lodash-es"
1863
+ ],
1864
+ "importNames": [
1865
+ "trim"
1866
+ ],
1867
+ "message": "Please use String.prototype.trim() instead."
1868
+ },
1869
+ {
1870
+ "group": [
1871
+ "lodash-es"
1872
+ ],
1873
+ "importNames": [
1874
+ "trimStart",
1875
+ "trimLeft"
1876
+ ],
1877
+ "message": "Please use String.prototype.trimStart() instead."
1878
+ },
1879
+ {
1880
+ "group": [
1881
+ "lodash-es"
1882
+ ],
1883
+ "importNames": [
1884
+ "trimEnd",
1885
+ "trimRight"
1886
+ ],
1887
+ "message": "Please use String.prototype.trimEnd() instead."
1888
+ },
1889
+ {
1890
+ "group": [
1891
+ "lodash-es"
1892
+ ],
1893
+ "importNames": [
1894
+ "toUpper"
1895
+ ],
1896
+ "message": "Please use String.prototype.toUpperCase() instead."
1897
+ },
1898
+ {
1899
+ "group": [
1900
+ "lodash-es"
1901
+ ],
1902
+ "importNames": [
1903
+ "toLower"
1904
+ ],
1905
+ "message": "Please use String.prototype.toLowerCase() instead."
1906
+ },
1907
+ {
1908
+ "group": [
1909
+ "lodash-es"
1910
+ ],
1911
+ "importNames": [
1912
+ "isArray"
1913
+ ],
1914
+ "message": "Please use Array.isArray() instead."
1915
+ },
1916
+ {
1917
+ "group": [
1918
+ "lodash-es"
1919
+ ],
1920
+ "importNames": [
1921
+ "isNaN"
1922
+ ],
1923
+ "message": "Please use Number.isNaN() instead."
1924
+ },
1925
+ {
1926
+ "group": [
1927
+ "lodash-es"
1928
+ ],
1929
+ "importNames": [
1930
+ "isFinite"
1931
+ ],
1932
+ "message": "Please use Number.isFinite() instead."
1933
+ },
1934
+ {
1935
+ "group": [
1936
+ "lodash-es"
1937
+ ],
1938
+ "importNames": [
1939
+ "isInteger"
1940
+ ],
1941
+ "message": "Please use Number.isInteger() instead."
1942
+ },
1943
+ {
1944
+ "group": [
1945
+ "lodash-es"
1946
+ ],
1947
+ "importNames": [
1948
+ "isNull"
1949
+ ],
1950
+ "message": "Please use value === null instead."
1951
+ },
1952
+ {
1953
+ "group": [
1954
+ "lodash-es"
1955
+ ],
1956
+ "importNames": [
1957
+ "isUndefined"
1958
+ ],
1959
+ "message": "Please use value === undefined instead."
1960
+ },
1961
+ {
1962
+ "group": [
1963
+ "lodash-es"
1964
+ ],
1965
+ "importNames": [
1966
+ "defaultTo"
1967
+ ],
1968
+ "message": "Please use value ?? defaultValue instead."
1969
+ },
1970
+ {
1971
+ "group": [
1972
+ "lodash-es"
1973
+ ],
1974
+ "importNames": [
1975
+ "assign"
1976
+ ],
1977
+ "message": "Please use Object.assign() or spread syntax {...obj} instead."
1978
+ },
1979
+ {
1980
+ "group": [
1981
+ "lodash-es"
1982
+ ],
1983
+ "importNames": [
1984
+ "flatten"
1985
+ ],
1986
+ "message": "Please use Array.prototype.flat() instead."
1987
+ },
1988
+ {
1989
+ "group": [
1990
+ "lodash-es"
1991
+ ],
1992
+ "importNames": [
1993
+ "flattenDeep"
1994
+ ],
1995
+ "message": "Please use Array.prototype.flat(Infinity) instead."
1996
+ },
1997
+ {
1998
+ "group": [
1999
+ "lodash-es"
2000
+ ],
2001
+ "importNames": [
2002
+ "isNil"
2003
+ ],
2004
+ "message": "Please use value === null || value === undefined instead."
2005
+ },
2006
+ {
2007
+ "group": [
2008
+ "lodash-es"
2009
+ ],
2010
+ "importNames": [
2011
+ "noop"
2012
+ ],
2013
+ "message": "Please use () => {} instead."
2014
+ },
2015
+ {
2016
+ "group": [
2017
+ "lodash-es"
2018
+ ],
2019
+ "importNames": [
2020
+ "identity"
2021
+ ],
2022
+ "message": "Please use x => x instead."
2023
+ },
2024
+ {
2025
+ "group": [
2026
+ "lodash-es"
2027
+ ],
2028
+ "importNames": [
2029
+ "first",
2030
+ "head"
2031
+ ],
2032
+ "message": "Please use Array.prototype.at(0) instead."
2033
+ },
2034
+ {
2035
+ "group": [
2036
+ "lodash-es"
2037
+ ],
2038
+ "importNames": [
2039
+ "last"
2040
+ ],
2041
+ "message": "Please use Array.prototype.at(-1) instead."
2042
+ },
2043
+ {
2044
+ "group": [
2045
+ "lodash-es"
2046
+ ],
2047
+ "importNames": [
2048
+ "forEach"
2049
+ ],
2050
+ "message": "Please use Array.prototype.forEach() instead."
2051
+ },
2052
+ {
2053
+ "group": [
2054
+ "lodash-es"
2055
+ ],
2056
+ "importNames": [
2057
+ "fromPairs"
2058
+ ],
2059
+ "message": "Please use Object.fromEntries() instead."
2060
+ },
2061
+ {
2062
+ "group": [
2063
+ "lodash-es"
2064
+ ],
2065
+ "importNames": [
2066
+ "join"
2067
+ ],
2068
+ "message": "Please use Array.prototype.join() instead."
2069
+ },
2070
+ {
2071
+ "group": [
2072
+ "lodash-es"
2073
+ ],
2074
+ "importNames": [
2075
+ "isDate"
2076
+ ],
2077
+ "message": "Please use val instanceof Date instead."
2078
+ },
2079
+ {
2080
+ "group": [
2081
+ "lodash-es"
2082
+ ],
2083
+ "importNames": [
2084
+ "isFunction"
2085
+ ],
2086
+ "message": "Please use typeof val === 'function' instead."
2087
+ },
2088
+ {
2089
+ "group": [
2090
+ "lodash-es"
2091
+ ],
2092
+ "importNames": [
2093
+ "isNumber"
2094
+ ],
2095
+ "message": "Please use typeof val === 'number' instead."
2096
+ },
2097
+ {
2098
+ "group": [
2099
+ "lodash-es"
2100
+ ],
2101
+ "importNames": [
2102
+ "isObject"
2103
+ ],
2104
+ "message": "Please use val !== null && typeof val === 'object' instead."
2105
+ },
2106
+ {
2107
+ "group": [
2108
+ "lodash-es"
2109
+ ],
2110
+ "importNames": [
2111
+ "isString"
2112
+ ],
2113
+ "message": "Please use typeof val === 'string' instead."
2114
+ },
2115
+ {
2116
+ "group": [
2117
+ "lodash-es"
2118
+ ],
2119
+ "importNames": [
2120
+ "toString"
2121
+ ],
2122
+ "message": "Please use String(val) instead."
2123
+ },
2124
+ {
2125
+ "group": [
2126
+ "lodash-es"
2127
+ ],
2128
+ "importNames": [
2129
+ "flow",
2130
+ "flowRight"
2131
+ ],
2132
+ "message": "Please use refactoring your code instead."
2133
+ }
2134
+ ]
2135
+ }
2136
+ ]
2137
+ }
2138
+ },
2139
+ {
2140
+ "files": [
2141
+ "**/eslint.config.ts",
2142
+ "**/eslint.config.js"
2143
+ ],
2144
+ "rules": {
2145
+ "no-restricted-exports": "off"
2146
+ }
2147
+ },
2148
+ {
2149
+ "files": [
2150
+ "**/*.ts",
2151
+ "**/*.tsx",
2152
+ "**/*.mts",
2153
+ "**/*.cts"
2154
+ ],
2155
+ "rules": {
2156
+ "constructor-super": "off",
2157
+ "getter-return": "off",
2158
+ "no-class-assign": "off",
2159
+ "no-const-assign": "off",
2160
+ "no-dupe-args": "off",
2161
+ "no-dupe-class-members": "off",
2162
+ "no-dupe-keys": "off",
2163
+ "no-func-assign": "off",
2164
+ "no-import-assign": "off",
2165
+ "no-new-native-nonconstructor": "off",
2166
+ "no-new-symbol": "off",
2167
+ "no-obj-calls": "off",
2168
+ "no-redeclare": "off",
2169
+ "no-setter-return": "off",
2170
+ "no-this-before-super": "off",
2171
+ "no-undef": "off",
2172
+ "no-unreachable": "off",
2173
+ "no-unsafe-negation": "off",
2174
+ "no-var": "error",
2175
+ "no-with": "off",
2176
+ "prefer-const": "error",
2177
+ "prefer-rest-params": "error",
2178
+ "prefer-spread": "error",
2179
+ "no-array-constructor": "off",
2180
+ "no-unused-expressions": "off",
2181
+ "no-unused-vars": "off",
2182
+ "@typescript-eslint/no-array-constructor": "error",
2183
+ "@typescript-eslint/no-duplicate-enum-values": "error",
2184
+ "@typescript-eslint/no-empty-object-type": "error",
2185
+ "@typescript-eslint/no-extra-non-null-assertion": "error",
2186
+ "@typescript-eslint/no-misused-new": "error",
2187
+ "@typescript-eslint/no-namespace": "error",
2188
+ "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
2189
+ "@typescript-eslint/no-require-imports": "error",
2190
+ "@typescript-eslint/no-this-alias": "error",
2191
+ "@typescript-eslint/no-unnecessary-type-constraint": "error",
2192
+ "@typescript-eslint/no-unsafe-declaration-merging": "error",
2193
+ "@typescript-eslint/prefer-as-const": "error",
2194
+ "@typescript-eslint/prefer-namespace-keyword": "error",
2195
+ "@typescript-eslint/triple-slash-reference": "error",
2196
+ "@typescript-eslint/explicit-function-return-type": 0,
2197
+ "@typescript-eslint/no-use-before-define": 0,
2198
+ "@typescript-eslint/no-empty-function": 0,
2199
+ "@typescript-eslint/no-unused-vars": [
2200
+ 2,
2201
+ {
2202
+ "varsIgnorePattern": "^_.*$",
2203
+ "argsIgnorePattern": "^_.*$"
2204
+ }
2205
+ ],
2206
+ "@typescript-eslint/no-explicit-any": "error",
2207
+ "@typescript-eslint/array-type": "off",
2208
+ "@typescript-eslint/ban-ts-comment": [
2209
+ "error",
2210
+ {
2211
+ "ts-expect-error": "allow-with-description"
2212
+ }
2213
+ ],
2214
+ "@typescript-eslint/no-wrapper-object-types": "error",
2215
+ "@typescript-eslint/no-unsafe-function-type": "error",
2216
+ "@typescript-eslint/no-restricted-types": [
2217
+ "error",
2218
+ {
2219
+ "types": {
2220
+ "String": {
2221
+ "message": "Use 'string' instead",
2222
+ "fixWith": "string"
2223
+ },
2224
+ "Number": {
2225
+ "message": "Use 'number' instead",
2226
+ "fixWith": "number"
2227
+ },
2228
+ "Boolean": {
2229
+ "message": "Use 'boolean' instead",
2230
+ "fixWith": "boolean"
2231
+ },
2232
+ "Symbol": {
2233
+ "message": "Use 'symbol' instead",
2234
+ "fixWith": "symbol"
2235
+ }
2236
+ }
2237
+ }
2238
+ ],
2239
+ "@typescript-eslint/explicit-member-accessibility": "off",
2240
+ "@typescript-eslint/interface-name-prefix": "off",
2241
+ "@typescript-eslint/member-ordering": "off",
2242
+ "@typescript-eslint/no-inferrable-types": "off",
2243
+ "@typescript-eslint/no-non-null-assertion": "off",
2244
+ "no-restricted-syntax": [
2245
+ "error",
2246
+ {
2247
+ "selector": "MemberExpression[object.name='React']",
2248
+ "message": "Do not use `React.*`. Use named imports instead."
2249
+ },
2250
+ {
2251
+ "selector": "TSTypeReference[typeName.type='TSQualifiedName'][typeName.left.name='React']",
2252
+ "message": "Do not use `React.*` types. Use named imports instead."
2253
+ },
2254
+ {
2255
+ "selector": "ExportNamespaceSpecifier",
2256
+ "message": "Usage of 'export * as …' is forbidden."
2257
+ },
2258
+ {
2259
+ "selector": "ExportAllDeclaration",
2260
+ "message": "Usage of `export * from` is forbidden."
2261
+ },
2262
+ {
2263
+ "selector": "ImportDeclaration[source.value=/^(?!.*reference_workspace)\\./] ImportNamespaceSpecifier",
2264
+ "message": "Do not use `import * as ...` from relative paths."
1461
2265
  }
1462
2266
  ],
1463
2267
  "@typescript-eslint/consistent-type-imports": [
@@ -1466,18 +2270,79 @@
1466
2270
  "prefer": "type-imports",
1467
2271
  "fixStyle": "inline-type-imports"
1468
2272
  }
2273
+ ],
2274
+ "@typescript-eslint/prefer-optional-chain": "error",
2275
+ "@typescript-eslint/consistent-type-exports": [
2276
+ "error",
2277
+ {
2278
+ "fixMixedExportsWithInlineTypeSpecifier": false
2279
+ }
2280
+ ],
2281
+ "@typescript-eslint/naming-convention": [
2282
+ "error",
2283
+ {
2284
+ "selector": "interface",
2285
+ "format": [
2286
+ "PascalCase"
2287
+ ],
2288
+ "custom": {
2289
+ "regex": "^I[A-Z]",
2290
+ "match": true
2291
+ }
2292
+ }
1469
2293
  ]
2294
+ },
2295
+ "parser": "@typescript-eslint/parser",
2296
+ "parserOptions": {
2297
+ "ecmaVersion": 2022,
2298
+ "sourceType": "module",
2299
+ "projectService": true
2300
+ }
2301
+ },
2302
+ {
2303
+ "files": [
2304
+ "**/eslint.config.ts"
2305
+ ],
2306
+ "rules": {
2307
+ "no-barrel-files/no-barrel-files": "off"
1470
2308
  }
1471
2309
  },
1472
2310
  {
1473
- "parser": "@typescript-eslint/parser",
1474
2311
  "files": [
1475
2312
  "**/*.ts",
2313
+ "**/*.cts",
2314
+ "**/*.mts",
1476
2315
  "**/*.tsx"
1477
2316
  ],
1478
- "extends": [
1479
- "plugin:import-x/typescript"
1480
- ]
2317
+ "settings": {
2318
+ "import-x/extensions": [
2319
+ ".ts",
2320
+ ".cts",
2321
+ ".mts",
2322
+ ".tsx",
2323
+ ".js",
2324
+ ".jsx",
2325
+ ".mjs",
2326
+ ".cjs"
2327
+ ],
2328
+ "import-x/external-module-folders": [
2329
+ "node_modules",
2330
+ "node_modules/@types"
2331
+ ],
2332
+ "import-x/parsers": {
2333
+ "@typescript-eslint/parser": [
2334
+ ".ts",
2335
+ ".cts",
2336
+ ".mts",
2337
+ ".tsx"
2338
+ ]
2339
+ },
2340
+ "import-x/resolver": {
2341
+ "typescript": {
2342
+ "alwaysTryTypes": true
2343
+ }
2344
+ }
2345
+ }
1481
2346
  },
1482
2347
  {
1483
2348
  "files": [
@@ -1510,30 +2375,37 @@
1510
2375
  "**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)",
1511
2376
  "**/*.story.@(ts|tsx|js|jsx|mjs|cjs)"
1512
2377
  ],
1513
- "extends": [
1514
- "plugin:storybook/recommended"
2378
+ "rules": {
2379
+ "react-hooks/rules-of-hooks": "off",
2380
+ "import/no-anonymous-default-export": "off",
2381
+ "storybook/await-interactions": "error",
2382
+ "storybook/context-in-play-function": "error",
2383
+ "storybook/default-exports": "error",
2384
+ "storybook/hierarchy-separator": "warn",
2385
+ "storybook/no-redundant-story-name": "warn",
2386
+ "storybook/no-renderer-packages": "error",
2387
+ "storybook/prefer-pascal-case": "error",
2388
+ "storybook/story-exports": "error",
2389
+ "storybook/use-storybook-expect": "error",
2390
+ "storybook/use-storybook-testing-library": "error"
2391
+ }
2392
+ },
2393
+ {
2394
+ "files": [
2395
+ ".storybook/main.@(js|cjs|mjs|ts)"
1515
2396
  ],
1516
2397
  "rules": {
1517
- "storybook/prefer-pascal-case": "error"
2398
+ "storybook/no-uninstalled-addons": "error"
1518
2399
  }
1519
2400
  }
1520
2401
  ],
1521
2402
  "settings": {
1522
- "import-x/resolver": {
1523
- "typescript": {
1524
- "alwaysTryTypes": true
1525
- },
1526
- "node": {
1527
- "extensions": [
1528
- ".ts",
1529
- ".tsx",
1530
- ".js",
1531
- ".jsx",
1532
- ".mjs",
1533
- ".cjs"
1534
- ]
1535
- }
1536
- },
2403
+ "import-x/extensions": [
2404
+ ".js",
2405
+ ".jsx",
2406
+ ".mjs",
2407
+ ".cjs"
2408
+ ],
1537
2409
  "react": {
1538
2410
  "version": "detect"
1539
2411
  }