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