eslint-plugin-mgw-eslint-rules 2.3.25 → 2.3.27
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.
- package/dist/index.js +177 -201
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +177 -201
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2703,177 +2703,177 @@ var require_ast_spec = __commonJS({
|
|
|
2703
2703
|
"use strict";
|
|
2704
2704
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2705
2705
|
exports2.AST_TOKEN_TYPES = exports2.AST_NODE_TYPES = void 0;
|
|
2706
|
-
var
|
|
2707
|
-
(function(
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
})(
|
|
2706
|
+
var AST_NODE_TYPES2;
|
|
2707
|
+
(function(AST_NODE_TYPES3) {
|
|
2708
|
+
AST_NODE_TYPES3["AccessorProperty"] = "AccessorProperty";
|
|
2709
|
+
AST_NODE_TYPES3["ArrayExpression"] = "ArrayExpression";
|
|
2710
|
+
AST_NODE_TYPES3["ArrayPattern"] = "ArrayPattern";
|
|
2711
|
+
AST_NODE_TYPES3["ArrowFunctionExpression"] = "ArrowFunctionExpression";
|
|
2712
|
+
AST_NODE_TYPES3["AssignmentExpression"] = "AssignmentExpression";
|
|
2713
|
+
AST_NODE_TYPES3["AssignmentPattern"] = "AssignmentPattern";
|
|
2714
|
+
AST_NODE_TYPES3["AwaitExpression"] = "AwaitExpression";
|
|
2715
|
+
AST_NODE_TYPES3["BinaryExpression"] = "BinaryExpression";
|
|
2716
|
+
AST_NODE_TYPES3["BlockStatement"] = "BlockStatement";
|
|
2717
|
+
AST_NODE_TYPES3["BreakStatement"] = "BreakStatement";
|
|
2718
|
+
AST_NODE_TYPES3["CallExpression"] = "CallExpression";
|
|
2719
|
+
AST_NODE_TYPES3["CatchClause"] = "CatchClause";
|
|
2720
|
+
AST_NODE_TYPES3["ChainExpression"] = "ChainExpression";
|
|
2721
|
+
AST_NODE_TYPES3["ClassBody"] = "ClassBody";
|
|
2722
|
+
AST_NODE_TYPES3["ClassDeclaration"] = "ClassDeclaration";
|
|
2723
|
+
AST_NODE_TYPES3["ClassExpression"] = "ClassExpression";
|
|
2724
|
+
AST_NODE_TYPES3["ConditionalExpression"] = "ConditionalExpression";
|
|
2725
|
+
AST_NODE_TYPES3["ContinueStatement"] = "ContinueStatement";
|
|
2726
|
+
AST_NODE_TYPES3["DebuggerStatement"] = "DebuggerStatement";
|
|
2727
|
+
AST_NODE_TYPES3["Decorator"] = "Decorator";
|
|
2728
|
+
AST_NODE_TYPES3["DoWhileStatement"] = "DoWhileStatement";
|
|
2729
|
+
AST_NODE_TYPES3["EmptyStatement"] = "EmptyStatement";
|
|
2730
|
+
AST_NODE_TYPES3["ExportAllDeclaration"] = "ExportAllDeclaration";
|
|
2731
|
+
AST_NODE_TYPES3["ExportDefaultDeclaration"] = "ExportDefaultDeclaration";
|
|
2732
|
+
AST_NODE_TYPES3["ExportNamedDeclaration"] = "ExportNamedDeclaration";
|
|
2733
|
+
AST_NODE_TYPES3["ExportSpecifier"] = "ExportSpecifier";
|
|
2734
|
+
AST_NODE_TYPES3["ExpressionStatement"] = "ExpressionStatement";
|
|
2735
|
+
AST_NODE_TYPES3["ForInStatement"] = "ForInStatement";
|
|
2736
|
+
AST_NODE_TYPES3["ForOfStatement"] = "ForOfStatement";
|
|
2737
|
+
AST_NODE_TYPES3["ForStatement"] = "ForStatement";
|
|
2738
|
+
AST_NODE_TYPES3["FunctionDeclaration"] = "FunctionDeclaration";
|
|
2739
|
+
AST_NODE_TYPES3["FunctionExpression"] = "FunctionExpression";
|
|
2740
|
+
AST_NODE_TYPES3["Identifier"] = "Identifier";
|
|
2741
|
+
AST_NODE_TYPES3["IfStatement"] = "IfStatement";
|
|
2742
|
+
AST_NODE_TYPES3["ImportAttribute"] = "ImportAttribute";
|
|
2743
|
+
AST_NODE_TYPES3["ImportDeclaration"] = "ImportDeclaration";
|
|
2744
|
+
AST_NODE_TYPES3["ImportDefaultSpecifier"] = "ImportDefaultSpecifier";
|
|
2745
|
+
AST_NODE_TYPES3["ImportExpression"] = "ImportExpression";
|
|
2746
|
+
AST_NODE_TYPES3["ImportNamespaceSpecifier"] = "ImportNamespaceSpecifier";
|
|
2747
|
+
AST_NODE_TYPES3["ImportSpecifier"] = "ImportSpecifier";
|
|
2748
|
+
AST_NODE_TYPES3["JSXAttribute"] = "JSXAttribute";
|
|
2749
|
+
AST_NODE_TYPES3["JSXClosingElement"] = "JSXClosingElement";
|
|
2750
|
+
AST_NODE_TYPES3["JSXClosingFragment"] = "JSXClosingFragment";
|
|
2751
|
+
AST_NODE_TYPES3["JSXElement"] = "JSXElement";
|
|
2752
|
+
AST_NODE_TYPES3["JSXEmptyExpression"] = "JSXEmptyExpression";
|
|
2753
|
+
AST_NODE_TYPES3["JSXExpressionContainer"] = "JSXExpressionContainer";
|
|
2754
|
+
AST_NODE_TYPES3["JSXFragment"] = "JSXFragment";
|
|
2755
|
+
AST_NODE_TYPES3["JSXIdentifier"] = "JSXIdentifier";
|
|
2756
|
+
AST_NODE_TYPES3["JSXMemberExpression"] = "JSXMemberExpression";
|
|
2757
|
+
AST_NODE_TYPES3["JSXNamespacedName"] = "JSXNamespacedName";
|
|
2758
|
+
AST_NODE_TYPES3["JSXOpeningElement"] = "JSXOpeningElement";
|
|
2759
|
+
AST_NODE_TYPES3["JSXOpeningFragment"] = "JSXOpeningFragment";
|
|
2760
|
+
AST_NODE_TYPES3["JSXSpreadAttribute"] = "JSXSpreadAttribute";
|
|
2761
|
+
AST_NODE_TYPES3["JSXSpreadChild"] = "JSXSpreadChild";
|
|
2762
|
+
AST_NODE_TYPES3["JSXText"] = "JSXText";
|
|
2763
|
+
AST_NODE_TYPES3["LabeledStatement"] = "LabeledStatement";
|
|
2764
|
+
AST_NODE_TYPES3["Literal"] = "Literal";
|
|
2765
|
+
AST_NODE_TYPES3["LogicalExpression"] = "LogicalExpression";
|
|
2766
|
+
AST_NODE_TYPES3["MemberExpression"] = "MemberExpression";
|
|
2767
|
+
AST_NODE_TYPES3["MetaProperty"] = "MetaProperty";
|
|
2768
|
+
AST_NODE_TYPES3["MethodDefinition"] = "MethodDefinition";
|
|
2769
|
+
AST_NODE_TYPES3["NewExpression"] = "NewExpression";
|
|
2770
|
+
AST_NODE_TYPES3["ObjectExpression"] = "ObjectExpression";
|
|
2771
|
+
AST_NODE_TYPES3["ObjectPattern"] = "ObjectPattern";
|
|
2772
|
+
AST_NODE_TYPES3["PrivateIdentifier"] = "PrivateIdentifier";
|
|
2773
|
+
AST_NODE_TYPES3["Program"] = "Program";
|
|
2774
|
+
AST_NODE_TYPES3["Property"] = "Property";
|
|
2775
|
+
AST_NODE_TYPES3["PropertyDefinition"] = "PropertyDefinition";
|
|
2776
|
+
AST_NODE_TYPES3["RestElement"] = "RestElement";
|
|
2777
|
+
AST_NODE_TYPES3["ReturnStatement"] = "ReturnStatement";
|
|
2778
|
+
AST_NODE_TYPES3["SequenceExpression"] = "SequenceExpression";
|
|
2779
|
+
AST_NODE_TYPES3["SpreadElement"] = "SpreadElement";
|
|
2780
|
+
AST_NODE_TYPES3["StaticBlock"] = "StaticBlock";
|
|
2781
|
+
AST_NODE_TYPES3["Super"] = "Super";
|
|
2782
|
+
AST_NODE_TYPES3["SwitchCase"] = "SwitchCase";
|
|
2783
|
+
AST_NODE_TYPES3["SwitchStatement"] = "SwitchStatement";
|
|
2784
|
+
AST_NODE_TYPES3["TaggedTemplateExpression"] = "TaggedTemplateExpression";
|
|
2785
|
+
AST_NODE_TYPES3["TemplateElement"] = "TemplateElement";
|
|
2786
|
+
AST_NODE_TYPES3["TemplateLiteral"] = "TemplateLiteral";
|
|
2787
|
+
AST_NODE_TYPES3["ThisExpression"] = "ThisExpression";
|
|
2788
|
+
AST_NODE_TYPES3["ThrowStatement"] = "ThrowStatement";
|
|
2789
|
+
AST_NODE_TYPES3["TryStatement"] = "TryStatement";
|
|
2790
|
+
AST_NODE_TYPES3["UnaryExpression"] = "UnaryExpression";
|
|
2791
|
+
AST_NODE_TYPES3["UpdateExpression"] = "UpdateExpression";
|
|
2792
|
+
AST_NODE_TYPES3["VariableDeclaration"] = "VariableDeclaration";
|
|
2793
|
+
AST_NODE_TYPES3["VariableDeclarator"] = "VariableDeclarator";
|
|
2794
|
+
AST_NODE_TYPES3["WhileStatement"] = "WhileStatement";
|
|
2795
|
+
AST_NODE_TYPES3["WithStatement"] = "WithStatement";
|
|
2796
|
+
AST_NODE_TYPES3["YieldExpression"] = "YieldExpression";
|
|
2797
|
+
AST_NODE_TYPES3["TSAbstractAccessorProperty"] = "TSAbstractAccessorProperty";
|
|
2798
|
+
AST_NODE_TYPES3["TSAbstractKeyword"] = "TSAbstractKeyword";
|
|
2799
|
+
AST_NODE_TYPES3["TSAbstractMethodDefinition"] = "TSAbstractMethodDefinition";
|
|
2800
|
+
AST_NODE_TYPES3["TSAbstractPropertyDefinition"] = "TSAbstractPropertyDefinition";
|
|
2801
|
+
AST_NODE_TYPES3["TSAnyKeyword"] = "TSAnyKeyword";
|
|
2802
|
+
AST_NODE_TYPES3["TSArrayType"] = "TSArrayType";
|
|
2803
|
+
AST_NODE_TYPES3["TSAsExpression"] = "TSAsExpression";
|
|
2804
|
+
AST_NODE_TYPES3["TSAsyncKeyword"] = "TSAsyncKeyword";
|
|
2805
|
+
AST_NODE_TYPES3["TSBigIntKeyword"] = "TSBigIntKeyword";
|
|
2806
|
+
AST_NODE_TYPES3["TSBooleanKeyword"] = "TSBooleanKeyword";
|
|
2807
|
+
AST_NODE_TYPES3["TSCallSignatureDeclaration"] = "TSCallSignatureDeclaration";
|
|
2808
|
+
AST_NODE_TYPES3["TSClassImplements"] = "TSClassImplements";
|
|
2809
|
+
AST_NODE_TYPES3["TSConditionalType"] = "TSConditionalType";
|
|
2810
|
+
AST_NODE_TYPES3["TSConstructorType"] = "TSConstructorType";
|
|
2811
|
+
AST_NODE_TYPES3["TSConstructSignatureDeclaration"] = "TSConstructSignatureDeclaration";
|
|
2812
|
+
AST_NODE_TYPES3["TSDeclareFunction"] = "TSDeclareFunction";
|
|
2813
|
+
AST_NODE_TYPES3["TSDeclareKeyword"] = "TSDeclareKeyword";
|
|
2814
|
+
AST_NODE_TYPES3["TSEmptyBodyFunctionExpression"] = "TSEmptyBodyFunctionExpression";
|
|
2815
|
+
AST_NODE_TYPES3["TSEnumBody"] = "TSEnumBody";
|
|
2816
|
+
AST_NODE_TYPES3["TSEnumDeclaration"] = "TSEnumDeclaration";
|
|
2817
|
+
AST_NODE_TYPES3["TSEnumMember"] = "TSEnumMember";
|
|
2818
|
+
AST_NODE_TYPES3["TSExportAssignment"] = "TSExportAssignment";
|
|
2819
|
+
AST_NODE_TYPES3["TSExportKeyword"] = "TSExportKeyword";
|
|
2820
|
+
AST_NODE_TYPES3["TSExternalModuleReference"] = "TSExternalModuleReference";
|
|
2821
|
+
AST_NODE_TYPES3["TSFunctionType"] = "TSFunctionType";
|
|
2822
|
+
AST_NODE_TYPES3["TSImportEqualsDeclaration"] = "TSImportEqualsDeclaration";
|
|
2823
|
+
AST_NODE_TYPES3["TSImportType"] = "TSImportType";
|
|
2824
|
+
AST_NODE_TYPES3["TSIndexedAccessType"] = "TSIndexedAccessType";
|
|
2825
|
+
AST_NODE_TYPES3["TSIndexSignature"] = "TSIndexSignature";
|
|
2826
|
+
AST_NODE_TYPES3["TSInferType"] = "TSInferType";
|
|
2827
|
+
AST_NODE_TYPES3["TSInstantiationExpression"] = "TSInstantiationExpression";
|
|
2828
|
+
AST_NODE_TYPES3["TSInterfaceBody"] = "TSInterfaceBody";
|
|
2829
|
+
AST_NODE_TYPES3["TSInterfaceDeclaration"] = "TSInterfaceDeclaration";
|
|
2830
|
+
AST_NODE_TYPES3["TSInterfaceHeritage"] = "TSInterfaceHeritage";
|
|
2831
|
+
AST_NODE_TYPES3["TSIntersectionType"] = "TSIntersectionType";
|
|
2832
|
+
AST_NODE_TYPES3["TSIntrinsicKeyword"] = "TSIntrinsicKeyword";
|
|
2833
|
+
AST_NODE_TYPES3["TSLiteralType"] = "TSLiteralType";
|
|
2834
|
+
AST_NODE_TYPES3["TSMappedType"] = "TSMappedType";
|
|
2835
|
+
AST_NODE_TYPES3["TSMethodSignature"] = "TSMethodSignature";
|
|
2836
|
+
AST_NODE_TYPES3["TSModuleBlock"] = "TSModuleBlock";
|
|
2837
|
+
AST_NODE_TYPES3["TSModuleDeclaration"] = "TSModuleDeclaration";
|
|
2838
|
+
AST_NODE_TYPES3["TSNamedTupleMember"] = "TSNamedTupleMember";
|
|
2839
|
+
AST_NODE_TYPES3["TSNamespaceExportDeclaration"] = "TSNamespaceExportDeclaration";
|
|
2840
|
+
AST_NODE_TYPES3["TSNeverKeyword"] = "TSNeverKeyword";
|
|
2841
|
+
AST_NODE_TYPES3["TSNonNullExpression"] = "TSNonNullExpression";
|
|
2842
|
+
AST_NODE_TYPES3["TSNullKeyword"] = "TSNullKeyword";
|
|
2843
|
+
AST_NODE_TYPES3["TSNumberKeyword"] = "TSNumberKeyword";
|
|
2844
|
+
AST_NODE_TYPES3["TSObjectKeyword"] = "TSObjectKeyword";
|
|
2845
|
+
AST_NODE_TYPES3["TSOptionalType"] = "TSOptionalType";
|
|
2846
|
+
AST_NODE_TYPES3["TSParameterProperty"] = "TSParameterProperty";
|
|
2847
|
+
AST_NODE_TYPES3["TSPrivateKeyword"] = "TSPrivateKeyword";
|
|
2848
|
+
AST_NODE_TYPES3["TSPropertySignature"] = "TSPropertySignature";
|
|
2849
|
+
AST_NODE_TYPES3["TSProtectedKeyword"] = "TSProtectedKeyword";
|
|
2850
|
+
AST_NODE_TYPES3["TSPublicKeyword"] = "TSPublicKeyword";
|
|
2851
|
+
AST_NODE_TYPES3["TSQualifiedName"] = "TSQualifiedName";
|
|
2852
|
+
AST_NODE_TYPES3["TSReadonlyKeyword"] = "TSReadonlyKeyword";
|
|
2853
|
+
AST_NODE_TYPES3["TSRestType"] = "TSRestType";
|
|
2854
|
+
AST_NODE_TYPES3["TSSatisfiesExpression"] = "TSSatisfiesExpression";
|
|
2855
|
+
AST_NODE_TYPES3["TSStaticKeyword"] = "TSStaticKeyword";
|
|
2856
|
+
AST_NODE_TYPES3["TSStringKeyword"] = "TSStringKeyword";
|
|
2857
|
+
AST_NODE_TYPES3["TSSymbolKeyword"] = "TSSymbolKeyword";
|
|
2858
|
+
AST_NODE_TYPES3["TSTemplateLiteralType"] = "TSTemplateLiteralType";
|
|
2859
|
+
AST_NODE_TYPES3["TSThisType"] = "TSThisType";
|
|
2860
|
+
AST_NODE_TYPES3["TSTupleType"] = "TSTupleType";
|
|
2861
|
+
AST_NODE_TYPES3["TSTypeAliasDeclaration"] = "TSTypeAliasDeclaration";
|
|
2862
|
+
AST_NODE_TYPES3["TSTypeAnnotation"] = "TSTypeAnnotation";
|
|
2863
|
+
AST_NODE_TYPES3["TSTypeAssertion"] = "TSTypeAssertion";
|
|
2864
|
+
AST_NODE_TYPES3["TSTypeLiteral"] = "TSTypeLiteral";
|
|
2865
|
+
AST_NODE_TYPES3["TSTypeOperator"] = "TSTypeOperator";
|
|
2866
|
+
AST_NODE_TYPES3["TSTypeParameter"] = "TSTypeParameter";
|
|
2867
|
+
AST_NODE_TYPES3["TSTypeParameterDeclaration"] = "TSTypeParameterDeclaration";
|
|
2868
|
+
AST_NODE_TYPES3["TSTypeParameterInstantiation"] = "TSTypeParameterInstantiation";
|
|
2869
|
+
AST_NODE_TYPES3["TSTypePredicate"] = "TSTypePredicate";
|
|
2870
|
+
AST_NODE_TYPES3["TSTypeQuery"] = "TSTypeQuery";
|
|
2871
|
+
AST_NODE_TYPES3["TSTypeReference"] = "TSTypeReference";
|
|
2872
|
+
AST_NODE_TYPES3["TSUndefinedKeyword"] = "TSUndefinedKeyword";
|
|
2873
|
+
AST_NODE_TYPES3["TSUnionType"] = "TSUnionType";
|
|
2874
|
+
AST_NODE_TYPES3["TSUnknownKeyword"] = "TSUnknownKeyword";
|
|
2875
|
+
AST_NODE_TYPES3["TSVoidKeyword"] = "TSVoidKeyword";
|
|
2876
|
+
})(AST_NODE_TYPES2 || (exports2.AST_NODE_TYPES = AST_NODE_TYPES2 = {}));
|
|
2877
2877
|
var AST_TOKEN_TYPES;
|
|
2878
2878
|
(function(AST_TOKEN_TYPES2) {
|
|
2879
2879
|
AST_TOKEN_TYPES2["Boolean"] = "Boolean";
|
|
@@ -44043,38 +44043,14 @@ var rule3 = createRule3({
|
|
|
44043
44043
|
},
|
|
44044
44044
|
defaultOptions: [],
|
|
44045
44045
|
create(context) {
|
|
44046
|
-
|
|
44047
|
-
const withoutGeneric = type.split("<")[0];
|
|
44048
|
-
return !!withoutGeneric && ["Signal", "WritableSignal", "InputSignal"].includes(withoutGeneric);
|
|
44049
|
-
}
|
|
44050
|
-
const { sourceCode } = context;
|
|
44051
|
-
const services = sourceCode.parserServices;
|
|
44052
|
-
if (!services || !services.program || !services.esTreeNodeToTSNodeMap) {
|
|
44053
|
-
return {};
|
|
44054
|
-
}
|
|
44046
|
+
const services = import_utils3.ESLintUtils.getParserServices(context);
|
|
44055
44047
|
const checker = services.program.getTypeChecker();
|
|
44056
44048
|
return {
|
|
44057
|
-
|
|
44058
|
-
const
|
|
44059
|
-
|
|
44060
|
-
|
|
44061
|
-
|
|
44062
|
-
console.log(type, typeName, variableNode);
|
|
44063
|
-
if (isSignal(typeName)) {
|
|
44064
|
-
const parent = node.parent;
|
|
44065
|
-
if (!parent || parent.type !== import_utils3.AST_NODE_TYPES.CallExpression) {
|
|
44066
|
-
return;
|
|
44067
|
-
}
|
|
44068
|
-
const callee = parent.callee;
|
|
44069
|
-
if (callee.type !== import_utils3.AST_NODE_TYPES.Identifier || callee.name !== node.name) {
|
|
44070
|
-
return;
|
|
44071
|
-
}
|
|
44072
|
-
context.report({
|
|
44073
|
-
node,
|
|
44074
|
-
messageId: "useGetter"
|
|
44075
|
-
});
|
|
44076
|
-
}
|
|
44077
|
-
}
|
|
44049
|
+
VariableDeclarator(node) {
|
|
44050
|
+
const tsNode = services.esTreeNodeToTSNodeMap.get(node.id);
|
|
44051
|
+
const type = checker.getTypeAtLocation(tsNode);
|
|
44052
|
+
const typeName = checker.typeToString(type);
|
|
44053
|
+
console.log(`Variable: ${node.id}, Type: ${typeName}`);
|
|
44078
44054
|
}
|
|
44079
44055
|
};
|
|
44080
44056
|
}
|