@eslint-react/ast
Advanced tools
Comparing version
@@ -210,6 +210,2 @@ import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/types'; | ||
declare const isMethodOrProperty: (node: TSESTree.Node | null | undefined) => node is TSESTree.MethodDefinitionComputedName | TSESTree.MethodDefinitionNonComputedName | TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName; | ||
declare const isLoop: (node: TSESTree.Node | null | undefined) => node is TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.WhileStatement; | ||
declare const isControlFlow: (data: TSESTree.Node | null | undefined) => data is TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.IfStatement | TSESTree.SwitchStatement | TSESTree.WhileStatement; | ||
declare const isConditional: (data: TSESTree.Node | null | undefined) => data is TSESTree.ConditionalExpression | TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.IfStatement | TSESTree.LogicalExpression | TSESTree.SwitchStatement | TSESTree.WhileStatement; | ||
declare const isArrayTupleType: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSArrayType | TSESTree.TSTupleType; | ||
declare const isProperty: (node: TSESTree.Node | null | undefined) => node is TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName | TSESTree.TSIndexSignature | TSESTree.TSParameterProperty | TSESTree.TSPropertySignatureComputedName | TSESTree.TSPropertySignatureNonComputedName; | ||
@@ -220,6 +216,3 @@ declare const isJSXElement: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXElement; | ||
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; | ||
declare const isDestructuringPattern: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrayPattern | TSESTree.AssignmentPattern | TSESTree.ObjectPattern | TSESTree.RestElement; | ||
declare const isTypeDeclaration: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSInterfaceDeclaration | TSESTree.TSTypeAliasDeclaration; | ||
declare const isLeftHandSideExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpression | TSESTree.CallExpression | TSESTree.ClassExpression | TSESTree.FunctionExpression | TSESTree.Identifier | TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | TSESTree.TemplateLiteral | TSESTree.ThisExpression; | ||
declare const isLeftHandSideExpressionType: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpression | TSESTree.CallExpression | TSESTree.ClassExpression | TSESTree.FunctionExpression | TSESTree.Identifier | TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | TSESTree.TemplateLiteral | TSESTree.ThisExpression | TSESTree.TSAsExpression | TSESTree.TSNonNullExpression | TSESTree.TSTypeAssertion; | ||
declare const isLoop: (node: TSESTree.Node | null | undefined) => node is TSESTree.DoWhileStatement | TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement | TSESTree.WhileStatement; | ||
declare const isTypeExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSInstantiationExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion; | ||
@@ -286,2 +279,2 @@ declare const isTypeAssertionExpression: (node: TSESTree.Node | null | undefined) => node is TSESTree.TSAsExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion; | ||
export { type FunctionInitPath, type TSESTreeArrayTupleType, type TSESTreeClass, type TSESTreeDestructuringPattern, type TSESTreeFunction, type TSESTreeFunctionType, type TSESTreeJSX, type TSESTreeLoop, type TSESTreeMethodOrProperty, type TSESTreeProperty, type TSESTreeTypeAssertionExpression, type TSESTreeTypeDeclaration, type TSESTreeTypeExpression, findParentNode, getArrayMethodCallbackIndexParamPosition, getClassId, getFunctionId, getFunctionInitPath, getJSExpression, getNestedCallExpressions, getNestedExpressionsOfType, getNestedIdentifiers, getNestedNewExpressions, getNestedReturnStatements, getPropertyName, hasCallInFunctionInitPath, is, isArrayFromCall, isArrayMapCall, isArrayTupleType, isClass, isConditional, isControlFlow, isDestructuringPattern, isEmptyFunction, isFunction, isFunctionType, isJSX, isJSXElement, isJSXFragment, isJSXTagNameExpression, isLeftHandSideExpression, isLeftHandSideExpressionType, isLineBreak, isLiteral, isLoop, isMethodOrProperty, isMultiLine, isNodeEqual, isOneOf, isProcessEnvNodeEnv, isProcessEnvNodeEnvCompare, isProperty, isThisExpression, isTypeAssertionExpression, isTypeDeclaration, isTypeExpression, toDelimiterCaseType, toString }; | ||
export { type FunctionInitPath, type TSESTreeArrayTupleType, type TSESTreeClass, type TSESTreeDestructuringPattern, type TSESTreeFunction, type TSESTreeFunctionType, type TSESTreeJSX, type TSESTreeLoop, type TSESTreeMethodOrProperty, type TSESTreeProperty, type TSESTreeTypeAssertionExpression, type TSESTreeTypeDeclaration, type TSESTreeTypeExpression, findParentNode, getArrayMethodCallbackIndexParamPosition, getClassId, getFunctionId, getFunctionInitPath, getJSExpression, getNestedCallExpressions, getNestedExpressionsOfType, getNestedIdentifiers, getNestedNewExpressions, getNestedReturnStatements, getPropertyName, hasCallInFunctionInitPath, is, isArrayFromCall, isArrayMapCall, isClass, isEmptyFunction, isFunction, isFunctionType, isJSX, isJSXElement, isJSXFragment, isJSXTagNameExpression, isLineBreak, isLiteral, isLoop, isMethodOrProperty, isMultiLine, isNodeEqual, isOneOf, isProcessEnvNodeEnv, isProcessEnvNodeEnvCompare, isProperty, isThisExpression, isTypeAssertionExpression, isTypeExpression, toDelimiterCaseType, toString }; |
@@ -73,24 +73,2 @@ 'use strict'; | ||
]); | ||
var isLoop = isOneOf([ | ||
types.AST_NODE_TYPES.DoWhileStatement, | ||
types.AST_NODE_TYPES.ForInStatement, | ||
types.AST_NODE_TYPES.ForOfStatement, | ||
types.AST_NODE_TYPES.ForStatement, | ||
types.AST_NODE_TYPES.WhileStatement | ||
]); | ||
var isControlFlow = eff.or( | ||
isLoop, | ||
isOneOf([ | ||
types.AST_NODE_TYPES.IfStatement, | ||
types.AST_NODE_TYPES.SwitchStatement | ||
]) | ||
); | ||
var isConditional = eff.or( | ||
isControlFlow, | ||
isOneOf([ | ||
types.AST_NODE_TYPES.LogicalExpression, | ||
types.AST_NODE_TYPES.ConditionalExpression | ||
]) | ||
); | ||
var isArrayTupleType = isOneOf([types.AST_NODE_TYPES.TSArrayType, types.AST_NODE_TYPES.TSTupleType]); | ||
var isProperty = isOneOf([ | ||
@@ -126,57 +104,9 @@ types.AST_NODE_TYPES.PropertyDefinition, | ||
]); | ||
var isDestructuringPattern = isOneOf([ | ||
types.AST_NODE_TYPES.ArrayPattern, | ||
types.AST_NODE_TYPES.AssignmentPattern, | ||
types.AST_NODE_TYPES.ObjectPattern, | ||
types.AST_NODE_TYPES.RestElement | ||
var isLoop = isOneOf([ | ||
types.AST_NODE_TYPES.DoWhileStatement, | ||
types.AST_NODE_TYPES.ForInStatement, | ||
types.AST_NODE_TYPES.ForOfStatement, | ||
types.AST_NODE_TYPES.ForStatement, | ||
types.AST_NODE_TYPES.WhileStatement | ||
]); | ||
var isTypeDeclaration = isOneOf([ | ||
types.AST_NODE_TYPES.TSInterfaceDeclaration, | ||
types.AST_NODE_TYPES.TSTypeAliasDeclaration | ||
]); | ||
var isLeftHandSideExpression = isOneOf([ | ||
types.AST_NODE_TYPES.ArrayExpression, | ||
types.AST_NODE_TYPES.ArrayPattern, | ||
types.AST_NODE_TYPES.ArrowFunctionExpression, | ||
types.AST_NODE_TYPES.CallExpression, | ||
types.AST_NODE_TYPES.ClassExpression, | ||
types.AST_NODE_TYPES.FunctionExpression, | ||
types.AST_NODE_TYPES.Identifier, | ||
types.AST_NODE_TYPES.JSXElement, | ||
types.AST_NODE_TYPES.JSXFragment, | ||
types.AST_NODE_TYPES.Literal, | ||
types.AST_NODE_TYPES.TemplateLiteral, | ||
types.AST_NODE_TYPES.MemberExpression, | ||
types.AST_NODE_TYPES.MetaProperty, | ||
types.AST_NODE_TYPES.ObjectExpression, | ||
types.AST_NODE_TYPES.ObjectPattern, | ||
types.AST_NODE_TYPES.SequenceExpression, | ||
types.AST_NODE_TYPES.Super, | ||
types.AST_NODE_TYPES.TaggedTemplateExpression, | ||
types.AST_NODE_TYPES.ThisExpression | ||
]); | ||
var isLeftHandSideExpressionType = isOneOf([ | ||
types.AST_NODE_TYPES.ArrayExpression, | ||
types.AST_NODE_TYPES.ArrayPattern, | ||
types.AST_NODE_TYPES.ArrowFunctionExpression, | ||
types.AST_NODE_TYPES.CallExpression, | ||
types.AST_NODE_TYPES.ClassExpression, | ||
types.AST_NODE_TYPES.FunctionExpression, | ||
types.AST_NODE_TYPES.Identifier, | ||
types.AST_NODE_TYPES.JSXElement, | ||
types.AST_NODE_TYPES.JSXFragment, | ||
types.AST_NODE_TYPES.Literal, | ||
types.AST_NODE_TYPES.TemplateLiteral, | ||
types.AST_NODE_TYPES.MemberExpression, | ||
types.AST_NODE_TYPES.MetaProperty, | ||
types.AST_NODE_TYPES.ObjectExpression, | ||
types.AST_NODE_TYPES.ObjectPattern, | ||
types.AST_NODE_TYPES.SequenceExpression, | ||
types.AST_NODE_TYPES.Super, | ||
types.AST_NODE_TYPES.TaggedTemplateExpression, | ||
types.AST_NODE_TYPES.ThisExpression, | ||
types.AST_NODE_TYPES.TSAsExpression, | ||
types.AST_NODE_TYPES.TSNonNullExpression, | ||
types.AST_NODE_TYPES.TSTypeAssertion | ||
]); | ||
var isTypeExpression = isOneOf([ | ||
@@ -609,7 +539,3 @@ types.AST_NODE_TYPES.TSAsExpression, | ||
exports.isArrayMapCall = isArrayMapCall; | ||
exports.isArrayTupleType = isArrayTupleType; | ||
exports.isClass = isClass; | ||
exports.isConditional = isConditional; | ||
exports.isControlFlow = isControlFlow; | ||
exports.isDestructuringPattern = isDestructuringPattern; | ||
exports.isEmptyFunction = isEmptyFunction; | ||
@@ -622,4 +548,2 @@ exports.isFunction = isFunction; | ||
exports.isJSXTagNameExpression = isJSXTagNameExpression; | ||
exports.isLeftHandSideExpression = isLeftHandSideExpression; | ||
exports.isLeftHandSideExpressionType = isLeftHandSideExpressionType; | ||
exports.isLineBreak = isLineBreak; | ||
@@ -637,5 +561,4 @@ exports.isLiteral = isLiteral; | ||
exports.isTypeAssertionExpression = isTypeAssertionExpression; | ||
exports.isTypeDeclaration = isTypeDeclaration; | ||
exports.isTypeExpression = isTypeExpression; | ||
exports.toDelimiterCaseType = toDelimiterCaseType; | ||
exports.toString = toString; |
{ | ||
"name": "@eslint-react/ast", | ||
"version": "1.52.3-next.11", | ||
"version": "1.52.3", | ||
"description": "ESLint React's TSESTree AST utility module.", | ||
@@ -38,8 +38,8 @@ "homepage": "https://github.com/Rel1cx/eslint-react", | ||
"dependencies": { | ||
"@typescript-eslint/types": "^8.35.1", | ||
"@typescript-eslint/typescript-estree": "^8.35.1", | ||
"@typescript-eslint/utils": "^8.35.1", | ||
"@typescript-eslint/types": "^8.36.0", | ||
"@typescript-eslint/typescript-estree": "^8.36.0", | ||
"@typescript-eslint/utils": "^8.36.0", | ||
"string-ts": "^2.2.1", | ||
"ts-pattern": "^5.7.1", | ||
"@eslint-react/eff": "1.52.3-next.11" | ||
"@eslint-react/eff": "1.52.3" | ||
}, | ||
@@ -51,3 +51,2 @@ "devDependencies": { | ||
"engines": { | ||
"bun": ">=1.0.15", | ||
"node": ">=18.18.0" | ||
@@ -54,0 +53,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
-100%76138
-12.35%1339
-10.79%+ Added
- Removed
Updated