@eslint-react/ast 5.14.5 → 5.14.7
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 +2 -1
- package/dist/index.js +38 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ type TSESTreeDirective = TSESTree.ExpressionStatement & {
|
|
|
12
12
|
};
|
|
13
13
|
type TSESTreeTypeExpression = TSESTree.TSAsExpression | TSESTree.TSTypeAssertion | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSInstantiationExpression;
|
|
14
14
|
declare namespace check_d_exports {
|
|
15
|
-
export { is, isClass, isDirective, isFunction, isIdentifier, isJSX, isJSXElement, isJSXElementOrFragment, isJSXFragment, isJSXTagNameExpression, isOneOf, isProperty, isPropertyOrMethod, isTypeAssertionExpression, isTypeExpression };
|
|
15
|
+
export { is, isClass, isDirective, isExpression, isFunction, isIdentifier, isJSX, isJSXElement, isJSXElementOrFragment, isJSXFragment, isJSXTagNameExpression, isOneOf, isProperty, isPropertyOrMethod, isTypeAssertionExpression, isTypeExpression };
|
|
16
16
|
}
|
|
17
17
|
declare const is: <NodeType extends AST_NODE_TYPES>(nodeType: NodeType) => (node: TSESTree.Node | null | undefined) => node is Extract<TSESTree.Node, {
|
|
18
18
|
type: NodeType;
|
|
@@ -33,6 +33,7 @@ declare const isJSXTagNameExpression: (node: TSESTree.Node | null | undefined) =
|
|
|
33
33
|
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;
|
|
34
34
|
declare const isTypeExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSInstantiationExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion;
|
|
35
35
|
declare const isTypeAssertionExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion;
|
|
36
|
+
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;
|
|
36
37
|
declare namespace compare_d_exports {
|
|
37
38
|
export { isEqual };
|
|
38
39
|
}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ var check_exports = /* @__PURE__ */ __exportAll({
|
|
|
7
7
|
is: () => is,
|
|
8
8
|
isClass: () => isClass,
|
|
9
9
|
isDirective: () => isDirective,
|
|
10
|
+
isExpression: () => isExpression,
|
|
10
11
|
isFunction: () => isFunction,
|
|
11
12
|
isIdentifier: () => isIdentifier,
|
|
12
13
|
isJSX: () => isJSX,
|
|
@@ -79,6 +80,43 @@ const isTypeAssertionExpression = isOneOf([
|
|
|
79
80
|
AST_NODE_TYPES.TSNonNullExpression,
|
|
80
81
|
AST_NODE_TYPES.TSSatisfiesExpression
|
|
81
82
|
]);
|
|
83
|
+
const isExpression = isOneOf([
|
|
84
|
+
AST_NODE_TYPES.ArrayExpression,
|
|
85
|
+
AST_NODE_TYPES.ArrayPattern,
|
|
86
|
+
AST_NODE_TYPES.ArrowFunctionExpression,
|
|
87
|
+
AST_NODE_TYPES.AssignmentExpression,
|
|
88
|
+
AST_NODE_TYPES.AwaitExpression,
|
|
89
|
+
AST_NODE_TYPES.BinaryExpression,
|
|
90
|
+
AST_NODE_TYPES.CallExpression,
|
|
91
|
+
AST_NODE_TYPES.ChainExpression,
|
|
92
|
+
AST_NODE_TYPES.ClassExpression,
|
|
93
|
+
AST_NODE_TYPES.ConditionalExpression,
|
|
94
|
+
AST_NODE_TYPES.FunctionExpression,
|
|
95
|
+
AST_NODE_TYPES.Identifier,
|
|
96
|
+
AST_NODE_TYPES.ImportExpression,
|
|
97
|
+
AST_NODE_TYPES.JSXElement,
|
|
98
|
+
AST_NODE_TYPES.JSXFragment,
|
|
99
|
+
AST_NODE_TYPES.Literal,
|
|
100
|
+
AST_NODE_TYPES.LogicalExpression,
|
|
101
|
+
AST_NODE_TYPES.MemberExpression,
|
|
102
|
+
AST_NODE_TYPES.MetaProperty,
|
|
103
|
+
AST_NODE_TYPES.NewExpression,
|
|
104
|
+
AST_NODE_TYPES.ObjectExpression,
|
|
105
|
+
AST_NODE_TYPES.ObjectPattern,
|
|
106
|
+
AST_NODE_TYPES.SequenceExpression,
|
|
107
|
+
AST_NODE_TYPES.Super,
|
|
108
|
+
AST_NODE_TYPES.TSAsExpression,
|
|
109
|
+
AST_NODE_TYPES.TSInstantiationExpression,
|
|
110
|
+
AST_NODE_TYPES.TSNonNullExpression,
|
|
111
|
+
AST_NODE_TYPES.TSSatisfiesExpression,
|
|
112
|
+
AST_NODE_TYPES.TSTypeAssertion,
|
|
113
|
+
AST_NODE_TYPES.TaggedTemplateExpression,
|
|
114
|
+
AST_NODE_TYPES.TemplateLiteral,
|
|
115
|
+
AST_NODE_TYPES.ThisExpression,
|
|
116
|
+
AST_NODE_TYPES.UnaryExpression,
|
|
117
|
+
AST_NODE_TYPES.UpdateExpression,
|
|
118
|
+
AST_NODE_TYPES.YieldExpression
|
|
119
|
+
]);
|
|
82
120
|
|
|
83
121
|
//#endregion
|
|
84
122
|
//#region ../../.pkgs/eff/dist/index.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/ast",
|
|
3
|
-
"version": "5.14.
|
|
3
|
+
"version": "5.14.7",
|
|
4
4
|
"description": "ESLint React's TSESTree AST utility module.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@typescript-eslint/parser": "^8.63.0",
|
|
39
|
-
"eslint": "^10.
|
|
39
|
+
"eslint": "^10.7.0",
|
|
40
40
|
"tsdown": "^0.22.4",
|
|
41
41
|
"typescript": "6.0.3",
|
|
42
42
|
"vitest": "^4.1.10",
|