@eslint-react/ast 4.2.3-beta.0 → 4.2.3-beta.1
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 +5 -5
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -200,7 +200,7 @@ declare function isDirectiveInFunction(node: TSESTreeFunction, name: string): bo
|
|
|
200
200
|
* where JS gives anonymous function expressions names. We roughly detect the
|
|
201
201
|
* same AST nodes with some exceptions to better fit our use case.
|
|
202
202
|
*/
|
|
203
|
-
declare function getFunctionId(node: TSESTree.Expression | TSESTreeFunction): TSESTree.
|
|
203
|
+
declare function getFunctionId(node: TSESTree.Expression | TSESTreeFunction): TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression | TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.PrivateInExpression | TSESTree.SymmetricBinaryExpression | TSESTree.CallExpression | TSESTree.ChainExpression | TSESTree.ClassExpression | TSESTree.ConditionalExpression | TSESTree.Identifier | TSESTree.ImportExpression | TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.TemplateLiteral | TSESTree.LogicalExpression | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.NewExpression | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | 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.YieldExpression | TSESTree.PrivateIdentifier | null;
|
|
204
204
|
/**
|
|
205
205
|
* Type representing the return type of getFunctionId
|
|
206
206
|
*/
|
|
@@ -326,13 +326,13 @@ declare const isFunction: (node: TSESTree.Node | null | undefined) => node is TS
|
|
|
326
326
|
* @param node The node to check
|
|
327
327
|
* @returns True if the node is a function type
|
|
328
328
|
*/
|
|
329
|
-
declare const isFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | TSESTree.
|
|
329
|
+
declare const isFunctionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression | TSESTree.TSDeclareFunctionNoDeclare | TSESTree.TSDeclareFunctionWithDeclare | TSESTree.TSCallSignatureDeclaration | TSESTree.TSConstructSignatureDeclaration | TSESTree.TSEmptyBodyFunctionExpression | TSESTree.TSFunctionType | TSESTree.TSMethodSignatureComputedName | TSESTree.TSMethodSignatureNonComputedName;
|
|
330
330
|
/**
|
|
331
331
|
* Check if a node is a class declaration or expression
|
|
332
332
|
* @param node The node to check
|
|
333
333
|
* @returns True if the node is a class
|
|
334
334
|
*/
|
|
335
|
-
declare const isClass: (node: TSESTree.Node | null | undefined) => node is TSESTree.
|
|
335
|
+
declare const isClass: (node: TSESTree.Node | null | undefined) => node is TSESTree.ClassExpression | TSESTree.ClassDeclarationWithName | TSESTree.ClassDeclarationWithOptionalName;
|
|
336
336
|
/**
|
|
337
337
|
* Check if a node is a method or property definition
|
|
338
338
|
* @param node The node to check
|
|
@@ -375,7 +375,7 @@ declare const isJSXTagNameExpression: (node: TSESTree.Node | null | undefined) =
|
|
|
375
375
|
* @returns True if the node is a JSX node
|
|
376
376
|
* @see TSESTreeJSX
|
|
377
377
|
*/
|
|
378
|
-
declare const isJSX: (node: TSESTree.Node | null | undefined) => node is TSESTree.
|
|
378
|
+
declare const isJSX: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.JSXAttribute | TSESTree.JSXClosingElement | TSESTree.JSXClosingFragment | TSESTree.JSXEmptyExpression | TSESTree.JSXExpressionContainer | TSESTree.JSXIdentifier | TSESTree.JSXMemberExpression | TSESTree.JSXNamespacedName | TSESTree.JSXOpeningElement | TSESTree.JSXOpeningFragment | TSESTree.JSXSpreadAttribute | TSESTree.JSXSpreadChild | TSESTree.JSXText;
|
|
379
379
|
/**
|
|
380
380
|
* Check if a node is a loop statement
|
|
381
381
|
* @param node The node to check
|
|
@@ -393,7 +393,7 @@ declare const isControlFlow: (data: TSESTree.Node | null | undefined) => data is
|
|
|
393
393
|
* @param node The node to check
|
|
394
394
|
* @returns True if the node is conditional
|
|
395
395
|
*/
|
|
396
|
-
declare const isConditional: (data: TSESTree.Node | null | undefined) => data is TSESTree.ConditionalExpression | TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.IfStatement | TSESTree.
|
|
396
|
+
declare const isConditional: (data: TSESTree.Node | null | undefined) => data is TSESTree.ConditionalExpression | TSESTree.LogicalExpression | TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.IfStatement | TSESTree.SwitchStatement | TSESTree.WhileStatement;
|
|
397
397
|
/**
|
|
398
398
|
* Check if a node is a TypeScript type expression
|
|
399
399
|
* @param node The node to check
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/ast",
|
|
3
|
-
"version": "4.2.3-beta.
|
|
3
|
+
"version": "4.2.3-beta.1",
|
|
4
4
|
"description": "ESLint React's TSESTree AST utility module.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"tsdown": "^0.21.7",
|
|
40
|
-
"@local/
|
|
41
|
-
"@local/
|
|
40
|
+
"@local/configs": "0.0.0",
|
|
41
|
+
"@local/eff": "3.0.0-beta.72"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"eslint": "^10.0.0",
|