@eslint-react/ast 5.27.1 → 5.27.2
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.d.ts +22 -22
- package/dist/index.js +60 -60
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,17 +8,17 @@ type TSESTreeClass = TSESTree.ClassDeclaration | TSESTree.ClassExpression;
|
|
|
8
8
|
type TSESTreeFunctionOrClass = TSESTreeFunction | TSESTreeClass;
|
|
9
9
|
/** Union of method and property definition node types. */
|
|
10
10
|
type TSESTreeMethodOrPropertyDefinition = TSESTree.PropertyDefinition | TSESTree.MethodDefinition;
|
|
11
|
+
/** An expression statement that is a directive (ex: `"use strict"`). */
|
|
12
|
+
type TSESTreeDirective = TSESTree.ExpressionStatement & {
|
|
13
|
+
directive: string;
|
|
14
|
+
expression: TSESTree.StringLiteral;
|
|
15
|
+
};
|
|
11
16
|
/** Union of all JSX-related node types. */
|
|
12
17
|
type TSESTreeJSX = TSESTree.JSXAttribute | TSESTree.JSXClosingElement | TSESTree.JSXClosingFragment | TSESTree.JSXElement | TSESTree.JSXEmptyExpression | TSESTree.JSXExpressionContainer | TSESTree.JSXFragment | TSESTree.JSXIdentifier | TSESTree.JSXMemberExpression | TSESTree.JSXNamespacedName | TSESTree.JSXOpeningElement | TSESTree.JSXOpeningFragment | TSESTree.JSXSpreadAttribute | TSESTree.JSXSpreadChild | TSESTree.JSXText;
|
|
13
18
|
/** Union of JSX element-like node types (element or fragment). */
|
|
14
19
|
type TSESTreeJSXElementLike = TSESTree.JSXElement | TSESTree.JSXFragment;
|
|
15
20
|
/** Union of JSX attribute-like node types (attribute or spread attribute). */
|
|
16
21
|
type TSESTreeJSXAttributeLike = TSESTree.JSXAttribute | TSESTree.JSXSpreadAttribute;
|
|
17
|
-
/** An expression statement that is a directive (ex: `"use strict"`). */
|
|
18
|
-
type TSESTreeDirective = TSESTree.ExpressionStatement & {
|
|
19
|
-
directive: string;
|
|
20
|
-
expression: TSESTree.StringLiteral;
|
|
21
|
-
};
|
|
22
22
|
/** Union of TypeScript type expression node types. */
|
|
23
23
|
type TSESTreeTypeExpression = TSESTree.TSAsExpression | TSESTree.TSTypeAssertion | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSInstantiationExpression;
|
|
24
24
|
/** Union of expression node types that wrap another expression (TypeScript type expressions and chain expressions) — the nodes `Extract.unwrap` strips. */
|
|
@@ -34,13 +34,6 @@ declare const is: <NodeType extends AST_NODE_TYPES>(nodeType: NodeType) => (node
|
|
|
34
34
|
declare const isOneOf: <NodeTypes extends readonly AST_NODE_TYPES[]>(nodeTypes: NodeTypes) => (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, {
|
|
35
35
|
type: NodeTypes[number];
|
|
36
36
|
}>;
|
|
37
|
-
/**
|
|
38
|
-
* Check if a node is a directive statement (ex: `"use client"`), optionally matching a specific directive name.
|
|
39
|
-
* @param node The node to check.
|
|
40
|
-
* @param name The directive name to match. When omitted, any directive matches.
|
|
41
|
-
* @returns `true` if the node is a matching directive statement.
|
|
42
|
-
*/
|
|
43
|
-
declare function isDirective(node: TSESTree.Node, name?: string): node is TSESTreeDirective;
|
|
44
37
|
/**
|
|
45
38
|
* Check if a node is an identifier, optionally matching a specific name.
|
|
46
39
|
* @param node The node to check.
|
|
@@ -48,12 +41,21 @@ declare function isDirective(node: TSESTree.Node, name?: string): node is TSESTr
|
|
|
48
41
|
* @returns `true` if the node is a matching identifier.
|
|
49
42
|
*/
|
|
50
43
|
declare function isIdentifier(node: TSESTree.Node, name?: string): node is TSESTree.Identifier;
|
|
44
|
+
/**
|
|
45
|
+
* Check if a node is a directive statement (ex: `"use client"`), optionally matching a specific directive name.
|
|
46
|
+
* @param node The node to check.
|
|
47
|
+
* @param name The directive name to match. When omitted, any directive matches.
|
|
48
|
+
* @returns `true` if the node is a matching directive statement.
|
|
49
|
+
*/
|
|
50
|
+
declare function isDirective(node: TSESTree.Node, name?: string): node is TSESTreeDirective;
|
|
51
51
|
/** Check if a node is a call expression. */
|
|
52
52
|
declare const isCallExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.CallExpression;
|
|
53
53
|
/** Check if a node is a member expression. */
|
|
54
54
|
declare const isMemberExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName;
|
|
55
55
|
/** Check if a node is an object expression. */
|
|
56
56
|
declare const isObjectExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.ObjectExpression;
|
|
57
|
+
/** Check if a node is an expression node. */
|
|
58
|
+
declare const isExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpressionWithBlockBody | TSESTree.ArrowFunctionExpressionWithExpressionBody | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.PrivateInExpression | TSESTree.SymmetricBinaryExpression | TSESTree.CallExpression | TSESTree.ChainExpression | TSESTree.ClassExpression | TSESTree.ConditionalExpression | TSESTree.FunctionExpression | TSESTree.Identifier | TSESTree.ImportExpression | TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.LogicalExpression | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.NewExpression | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | TSESTree.TemplateLiteral | TSESTree.ThisExpression | TSESTree.TSAsExpression | TSESTree.TSInstantiationExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion | TSESTree.UnaryExpressionBitwiseNot | TSESTree.UnaryExpressionDelete | TSESTree.UnaryExpressionMinus | TSESTree.UnaryExpressionNot | TSESTree.UnaryExpressionPlus | TSESTree.UnaryExpressionTypeof | TSESTree.UnaryExpressionVoid | TSESTree.UpdateExpression | TSESTree.YieldNoStarExpression | TSESTree.YieldStarExpression;
|
|
57
59
|
/** Check if a node is a return statement. */
|
|
58
60
|
declare const isReturnStatement: (node: TSESTree.Node | null | undefined) => node is TSESTree.ReturnStatement;
|
|
59
61
|
/** Check if a node is a class declaration or class expression. */
|
|
@@ -66,30 +68,28 @@ declare const isFunctionOrClass: (node: TSESTree.Node | null | undefined) => nod
|
|
|
66
68
|
declare const isProperty: (node: TSESTree.Node | null | undefined) => node is TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName | TSESTree.TSIndexSignature | TSESTree.TSParameterProperty | TSESTree.TSPropertySignatureComputedName | TSESTree.TSPropertySignatureNonComputedName;
|
|
67
69
|
/** Check if a node is a property or method definition. */
|
|
68
70
|
declare const isPropertyOrMethod: (node: TSESTree.Node | null | undefined) => node is TSESTree.MethodDefinitionComputedName | TSESTree.MethodDefinitionNonComputedName | TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName;
|
|
71
|
+
/** Check if a node is a conditional expression or a control flow statement. */
|
|
72
|
+
declare const isConditional: (node: TSESTree.Node | null | undefined) => node is TSESTree.ConditionalExpression | TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.IfStatement | TSESTree.LogicalExpression | TSESTree.SwitchStatement | TSESTree.WhileStatement;
|
|
73
|
+
/** Check if a node is any JSX-related node. */
|
|
74
|
+
declare const isJSX: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXAttribute | TSESTree.JSXClosingElement | TSESTree.JSXClosingFragment | TSESTree.JSXElement | TSESTree.JSXEmptyExpression | TSESTree.JSXExpressionContainer | TSESTree.JSXFragment | TSESTree.JSXIdentifier | TSESTree.JSXMemberExpression | TSESTree.JSXNamespacedName | TSESTree.JSXOpeningElement | TSESTree.JSXOpeningFragment | TSESTree.JSXSpreadAttribute | TSESTree.JSXSpreadChild | TSESTree.JSXText;
|
|
69
75
|
/** Check if a node is a JSX element. */
|
|
70
76
|
declare const isJSXElement: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXElement;
|
|
71
|
-
/** Check if a node is a JSX expression container. */
|
|
72
|
-
declare const isJSXExpressionContainer: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXExpressionContainer;
|
|
73
|
-
/** Check if a node is a JSX spread attribute. */
|
|
74
|
-
declare const isJSXSpreadAttribute: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXSpreadAttribute;
|
|
75
77
|
/** Check if a node is a JSX fragment. */
|
|
76
78
|
declare const isJSXFragment: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXFragment;
|
|
77
79
|
/** Check if a node is a JSX element or JSX fragment. */
|
|
78
80
|
declare const isJSXElementOrFragment: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXElement | TSESTree.JSXFragment;
|
|
81
|
+
/** Check if a node is a JSX expression container. */
|
|
82
|
+
declare const isJSXExpressionContainer: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXExpressionContainer;
|
|
83
|
+
/** Check if a node is a JSX spread attribute. */
|
|
84
|
+
declare const isJSXSpreadAttribute: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXSpreadAttribute;
|
|
79
85
|
/** Check if a node can appear as a JSX tag name. */
|
|
80
86
|
declare const isJSXTagNameExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXIdentifier | TSESTree.JSXMemberExpression | TSESTree.JSXNamespacedName;
|
|
81
|
-
/** Check if a node is any JSX-related node. */
|
|
82
|
-
declare const isJSX: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXAttribute | TSESTree.JSXClosingElement | TSESTree.JSXClosingFragment | TSESTree.JSXElement | TSESTree.JSXEmptyExpression | TSESTree.JSXExpressionContainer | TSESTree.JSXFragment | TSESTree.JSXIdentifier | TSESTree.JSXMemberExpression | TSESTree.JSXNamespacedName | TSESTree.JSXOpeningElement | TSESTree.JSXOpeningFragment | TSESTree.JSXSpreadAttribute | TSESTree.JSXSpreadChild | TSESTree.JSXText;
|
|
83
87
|
/** Check if a node is a TypeScript type expression (assertion, non-null, satisfies, or instantiation). */
|
|
84
88
|
declare const isTypeExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSInstantiationExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion;
|
|
85
89
|
/** Check if a node is a TypeScript type assertion-like expression (as, assertion, non-null, or satisfies). */
|
|
86
90
|
declare const isTypeAssertionExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion;
|
|
87
91
|
/** Check if a node is a TypeScript type expression or a chain expression (i.e. a transparent wrapper around an inner expression). */
|
|
88
92
|
declare const isTypeOrChainExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.ChainExpression | TSESTree.TSAsExpression | TSESTree.TSInstantiationExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion;
|
|
89
|
-
/** Check if a node is an expression node. */
|
|
90
|
-
declare const isExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpressionWithBlockBody | TSESTree.ArrowFunctionExpressionWithExpressionBody | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.PrivateInExpression | TSESTree.SymmetricBinaryExpression | TSESTree.CallExpression | TSESTree.ChainExpression | TSESTree.ClassExpression | TSESTree.ConditionalExpression | TSESTree.FunctionExpression | TSESTree.Identifier | TSESTree.ImportExpression | TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.LogicalExpression | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.NewExpression | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | TSESTree.TemplateLiteral | TSESTree.ThisExpression | TSESTree.TSAsExpression | TSESTree.TSInstantiationExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion | TSESTree.UnaryExpressionBitwiseNot | TSESTree.UnaryExpressionDelete | TSESTree.UnaryExpressionMinus | TSESTree.UnaryExpressionNot | TSESTree.UnaryExpressionPlus | TSESTree.UnaryExpressionTypeof | TSESTree.UnaryExpressionVoid | TSESTree.UpdateExpression | TSESTree.YieldNoStarExpression | TSESTree.YieldStarExpression;
|
|
91
|
-
/** Check if a node is a conditional expression or a control flow statement. */
|
|
92
|
-
declare const isConditional: (node: TSESTree.Node | null | undefined) => node is TSESTree.ConditionalExpression | TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.IfStatement | TSESTree.LogicalExpression | TSESTree.SwitchStatement | TSESTree.WhileStatement;
|
|
93
93
|
declare namespace compare_d_exports {
|
|
94
94
|
export { isEqual };
|
|
95
95
|
}
|
package/dist/index.js
CHANGED
|
@@ -31,15 +31,52 @@ var check_exports = /* @__PURE__ */ __exportAll({
|
|
|
31
31
|
});
|
|
32
32
|
const is = ASTUtils.isNodeOfType;
|
|
33
33
|
const isOneOf = ASTUtils.isNodeOfTypes;
|
|
34
|
-
function isDirective(node, name) {
|
|
35
|
-
return node.type === AST_NODE_TYPES.ExpressionStatement && (name == null || node.directive === name);
|
|
36
|
-
}
|
|
37
34
|
function isIdentifier(node, name) {
|
|
38
35
|
return node.type === AST_NODE_TYPES.Identifier && (name == null || node.name === name);
|
|
39
36
|
}
|
|
37
|
+
function isDirective(node, name) {
|
|
38
|
+
return node.type === AST_NODE_TYPES.ExpressionStatement && (name == null || node.directive === name);
|
|
39
|
+
}
|
|
40
40
|
const isCallExpression = is(AST_NODE_TYPES.CallExpression);
|
|
41
41
|
const isMemberExpression = is(AST_NODE_TYPES.MemberExpression);
|
|
42
42
|
const isObjectExpression = is(AST_NODE_TYPES.ObjectExpression);
|
|
43
|
+
const isExpression = isOneOf([
|
|
44
|
+
AST_NODE_TYPES.ArrayExpression,
|
|
45
|
+
AST_NODE_TYPES.ArrayPattern,
|
|
46
|
+
AST_NODE_TYPES.ArrowFunctionExpression,
|
|
47
|
+
AST_NODE_TYPES.AssignmentExpression,
|
|
48
|
+
AST_NODE_TYPES.AwaitExpression,
|
|
49
|
+
AST_NODE_TYPES.BinaryExpression,
|
|
50
|
+
AST_NODE_TYPES.CallExpression,
|
|
51
|
+
AST_NODE_TYPES.ChainExpression,
|
|
52
|
+
AST_NODE_TYPES.ClassExpression,
|
|
53
|
+
AST_NODE_TYPES.ConditionalExpression,
|
|
54
|
+
AST_NODE_TYPES.FunctionExpression,
|
|
55
|
+
AST_NODE_TYPES.Identifier,
|
|
56
|
+
AST_NODE_TYPES.ImportExpression,
|
|
57
|
+
AST_NODE_TYPES.JSXElement,
|
|
58
|
+
AST_NODE_TYPES.JSXFragment,
|
|
59
|
+
AST_NODE_TYPES.Literal,
|
|
60
|
+
AST_NODE_TYPES.LogicalExpression,
|
|
61
|
+
AST_NODE_TYPES.MemberExpression,
|
|
62
|
+
AST_NODE_TYPES.MetaProperty,
|
|
63
|
+
AST_NODE_TYPES.NewExpression,
|
|
64
|
+
AST_NODE_TYPES.ObjectExpression,
|
|
65
|
+
AST_NODE_TYPES.ObjectPattern,
|
|
66
|
+
AST_NODE_TYPES.SequenceExpression,
|
|
67
|
+
AST_NODE_TYPES.Super,
|
|
68
|
+
AST_NODE_TYPES.TSAsExpression,
|
|
69
|
+
AST_NODE_TYPES.TSInstantiationExpression,
|
|
70
|
+
AST_NODE_TYPES.TSNonNullExpression,
|
|
71
|
+
AST_NODE_TYPES.TSSatisfiesExpression,
|
|
72
|
+
AST_NODE_TYPES.TSTypeAssertion,
|
|
73
|
+
AST_NODE_TYPES.TaggedTemplateExpression,
|
|
74
|
+
AST_NODE_TYPES.TemplateLiteral,
|
|
75
|
+
AST_NODE_TYPES.ThisExpression,
|
|
76
|
+
AST_NODE_TYPES.UnaryExpression,
|
|
77
|
+
AST_NODE_TYPES.UpdateExpression,
|
|
78
|
+
AST_NODE_TYPES.YieldExpression
|
|
79
|
+
]);
|
|
43
80
|
const isReturnStatement = is(AST_NODE_TYPES.ReturnStatement);
|
|
44
81
|
const isClass = isOneOf([AST_NODE_TYPES.ClassDeclaration, AST_NODE_TYPES.ClassExpression]);
|
|
45
82
|
const isFunction$1 = isOneOf([
|
|
@@ -61,15 +98,16 @@ const isProperty = isOneOf([
|
|
|
61
98
|
AST_NODE_TYPES.TSPropertySignature
|
|
62
99
|
]);
|
|
63
100
|
const isPropertyOrMethod = isOneOf([AST_NODE_TYPES.PropertyDefinition, AST_NODE_TYPES.MethodDefinition]);
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
AST_NODE_TYPES.
|
|
71
|
-
AST_NODE_TYPES.
|
|
72
|
-
AST_NODE_TYPES.
|
|
101
|
+
const isConditional = isOneOf([
|
|
102
|
+
AST_NODE_TYPES.DoWhileStatement,
|
|
103
|
+
AST_NODE_TYPES.ForInStatement,
|
|
104
|
+
AST_NODE_TYPES.ForOfStatement,
|
|
105
|
+
AST_NODE_TYPES.ForStatement,
|
|
106
|
+
AST_NODE_TYPES.WhileStatement,
|
|
107
|
+
AST_NODE_TYPES.IfStatement,
|
|
108
|
+
AST_NODE_TYPES.SwitchStatement,
|
|
109
|
+
AST_NODE_TYPES.LogicalExpression,
|
|
110
|
+
AST_NODE_TYPES.ConditionalExpression
|
|
73
111
|
]);
|
|
74
112
|
const isJSX = isOneOf([
|
|
75
113
|
AST_NODE_TYPES.JSXAttribute,
|
|
@@ -88,6 +126,16 @@ const isJSX = isOneOf([
|
|
|
88
126
|
AST_NODE_TYPES.JSXSpreadChild,
|
|
89
127
|
AST_NODE_TYPES.JSXText
|
|
90
128
|
]);
|
|
129
|
+
const isJSXElement = is(AST_NODE_TYPES.JSXElement);
|
|
130
|
+
const isJSXFragment = is(AST_NODE_TYPES.JSXFragment);
|
|
131
|
+
const isJSXElementOrFragment = isOneOf([AST_NODE_TYPES.JSXElement, AST_NODE_TYPES.JSXFragment]);
|
|
132
|
+
const isJSXExpressionContainer = is(AST_NODE_TYPES.JSXExpressionContainer);
|
|
133
|
+
const isJSXSpreadAttribute = is(AST_NODE_TYPES.JSXSpreadAttribute);
|
|
134
|
+
const isJSXTagNameExpression = isOneOf([
|
|
135
|
+
AST_NODE_TYPES.JSXIdentifier,
|
|
136
|
+
AST_NODE_TYPES.JSXMemberExpression,
|
|
137
|
+
AST_NODE_TYPES.JSXNamespacedName
|
|
138
|
+
]);
|
|
91
139
|
const isTypeExpression = isOneOf([
|
|
92
140
|
AST_NODE_TYPES.TSAsExpression,
|
|
93
141
|
AST_NODE_TYPES.TSTypeAssertion,
|
|
@@ -109,54 +157,6 @@ const isTypeOrChainExpression = isOneOf([
|
|
|
109
157
|
AST_NODE_TYPES.TSInstantiationExpression,
|
|
110
158
|
AST_NODE_TYPES.ChainExpression
|
|
111
159
|
]);
|
|
112
|
-
const isExpression = isOneOf([
|
|
113
|
-
AST_NODE_TYPES.ArrayExpression,
|
|
114
|
-
AST_NODE_TYPES.ArrayPattern,
|
|
115
|
-
AST_NODE_TYPES.ArrowFunctionExpression,
|
|
116
|
-
AST_NODE_TYPES.AssignmentExpression,
|
|
117
|
-
AST_NODE_TYPES.AwaitExpression,
|
|
118
|
-
AST_NODE_TYPES.BinaryExpression,
|
|
119
|
-
AST_NODE_TYPES.CallExpression,
|
|
120
|
-
AST_NODE_TYPES.ChainExpression,
|
|
121
|
-
AST_NODE_TYPES.ClassExpression,
|
|
122
|
-
AST_NODE_TYPES.ConditionalExpression,
|
|
123
|
-
AST_NODE_TYPES.FunctionExpression,
|
|
124
|
-
AST_NODE_TYPES.Identifier,
|
|
125
|
-
AST_NODE_TYPES.ImportExpression,
|
|
126
|
-
AST_NODE_TYPES.JSXElement,
|
|
127
|
-
AST_NODE_TYPES.JSXFragment,
|
|
128
|
-
AST_NODE_TYPES.Literal,
|
|
129
|
-
AST_NODE_TYPES.LogicalExpression,
|
|
130
|
-
AST_NODE_TYPES.MemberExpression,
|
|
131
|
-
AST_NODE_TYPES.MetaProperty,
|
|
132
|
-
AST_NODE_TYPES.NewExpression,
|
|
133
|
-
AST_NODE_TYPES.ObjectExpression,
|
|
134
|
-
AST_NODE_TYPES.ObjectPattern,
|
|
135
|
-
AST_NODE_TYPES.SequenceExpression,
|
|
136
|
-
AST_NODE_TYPES.Super,
|
|
137
|
-
AST_NODE_TYPES.TSAsExpression,
|
|
138
|
-
AST_NODE_TYPES.TSInstantiationExpression,
|
|
139
|
-
AST_NODE_TYPES.TSNonNullExpression,
|
|
140
|
-
AST_NODE_TYPES.TSSatisfiesExpression,
|
|
141
|
-
AST_NODE_TYPES.TSTypeAssertion,
|
|
142
|
-
AST_NODE_TYPES.TaggedTemplateExpression,
|
|
143
|
-
AST_NODE_TYPES.TemplateLiteral,
|
|
144
|
-
AST_NODE_TYPES.ThisExpression,
|
|
145
|
-
AST_NODE_TYPES.UnaryExpression,
|
|
146
|
-
AST_NODE_TYPES.UpdateExpression,
|
|
147
|
-
AST_NODE_TYPES.YieldExpression
|
|
148
|
-
]);
|
|
149
|
-
const isConditional = isOneOf([
|
|
150
|
-
AST_NODE_TYPES.DoWhileStatement,
|
|
151
|
-
AST_NODE_TYPES.ForInStatement,
|
|
152
|
-
AST_NODE_TYPES.ForOfStatement,
|
|
153
|
-
AST_NODE_TYPES.ForStatement,
|
|
154
|
-
AST_NODE_TYPES.WhileStatement,
|
|
155
|
-
AST_NODE_TYPES.IfStatement,
|
|
156
|
-
AST_NODE_TYPES.SwitchStatement,
|
|
157
|
-
AST_NODE_TYPES.LogicalExpression,
|
|
158
|
-
AST_NODE_TYPES.ConditionalExpression
|
|
159
|
-
]);
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region ../../.pkgs/eff/dist/index.js
|
|
162
162
|
const pipeArguments = (self, args) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/ast",
|
|
3
|
-
"version": "5.27.
|
|
3
|
+
"version": "5.27.2",
|
|
4
4
|
"description": "ESLint React's TSESTree AST utility module.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"@local/configs": "0.0.0",
|
|
38
38
|
"@local/eff": "0.0.0",
|
|
39
39
|
"@local/testkit": "0.0.0",
|
|
40
|
+
"@tsconfig/node20": "^20.1.10",
|
|
41
|
+
"@types/node": "^20.19.43",
|
|
40
42
|
"eslint": "^10.12.0",
|
|
41
43
|
"tsdown": "^0.23.1",
|
|
42
44
|
"typescript": "6.0.3",
|