@eslint-react/ast
Advanced tools
Comparing version 0.10.11 to 0.10.12-beta.0
@@ -1116,2 +1116,4 @@ import { TSESTree, AST_NODE_TYPES } from '@typescript-eslint/types'; | ||
export { Construction, ConstructionHint, ESLintCommunityESLintUtils, NodeType, type ReadableNodeType, type TSESTreeArrayTupleType, type TSESTreeClass, type TSESTreeDestructuringPattern, type TSESTreeFunction, type TSESTreeFunctionType, type TSESTreeJSX, type TSESTreeLoop, type TSESTreeProperty, type TSESTreeTypeDeclaration, getClassIdentifier, getFunctionIdentifier, getNestedCallExpressions, getNestedIdentifiers, getNestedReturnStatements, inspectConstruction, is, isArrayTupleType, isClass, isDestructuringPattern, isFunction, isFunctionOfClassMethod, isFunctionOfClassProperty, isFunctionOfObjectMethod, isFunctionType, isJSX, isJSXElement, isJSXFragment, isJSXTagNameExpression, isLeftHandSideExpression, isLeftHandSideExpressionType, isLoop, isMultiLine, isNodeEqual, isOneOf, isProperty, isRegExpLiteral, isStringLiteral, isTypeDeclaration, readableNodeType, traverseUp, traverseUpGuard }; | ||
declare function isThisExpression(node: TSESTree.Expression): boolean; | ||
export { Construction, ConstructionHint, ESLintCommunityESLintUtils, NodeType, type ReadableNodeType, type TSESTreeArrayTupleType, type TSESTreeClass, type TSESTreeDestructuringPattern, type TSESTreeFunction, type TSESTreeFunctionType, type TSESTreeJSX, type TSESTreeLoop, type TSESTreeProperty, type TSESTreeTypeDeclaration, getClassIdentifier, getFunctionIdentifier, getNestedCallExpressions, getNestedIdentifiers, getNestedReturnStatements, inspectConstruction, is, isArrayTupleType, isClass, isDestructuringPattern, isFunction, isFunctionOfClassMethod, isFunctionOfClassProperty, isFunctionOfObjectMethod, isFunctionType, isJSX, isJSXElement, isJSXFragment, isJSXTagNameExpression, isLeftHandSideExpression, isLeftHandSideExpressionType, isLoop, isMultiLine, isNodeEqual, isOneOf, isProperty, isRegExpLiteral, isStringLiteral, isThisExpression, isTypeDeclaration, readableNodeType, traverseUp, traverseUpGuard }; |
@@ -368,3 +368,3 @@ 'use strict'; | ||
}).when(is(NodeType.ConditionalExpression), (node)=>{ | ||
if (!("consequent" in node && "alternate" in node && !tools._.isNullable(node.alternate))) { | ||
if (!("consequent" in node && "alternate" in node && !tools.Prd.isNullable(node.alternate))) { | ||
return None; | ||
@@ -376,3 +376,3 @@ } | ||
}).when(is(NodeType.Identifier), (node)=>{ | ||
if (!("name" in node && tools._.isString(node.name))) return None; | ||
if (!("name" in node && tools.Prd.isString(node.name))) return None; | ||
const maybeLatestDef = tools.O.fromNullable(scope.set.get(node.name)?.defs.at(-1)); | ||
@@ -402,3 +402,3 @@ if (tools.O.isNone(maybeLatestDef)) return None; | ||
]), ()=>{ | ||
if (!("expression" in node) || !tools._.isObject(node.expression)) return None; | ||
if (!("expression" in node) || !tools.Prd.isObject(node.expression)) return None; | ||
return detect(node.expression); | ||
@@ -608,3 +608,3 @@ }).otherwise(()=>None); | ||
function isStringLiteral(node) { | ||
return node.type === NodeType.Literal && tools._.isString(node.value); | ||
return node.type === NodeType.Literal && tools.Prd.isString(node.value); | ||
} | ||
@@ -672,2 +672,9 @@ | ||
function isThisExpression(node) { | ||
if (node.type === NodeType.TSAsExpression) { | ||
return isThisExpression(node.expression); | ||
} | ||
return node.type === NodeType.ThisExpression; | ||
} | ||
exports.Construction = Construction; | ||
@@ -704,2 +711,3 @@ exports.ConstructionHint = ConstructionHint; | ||
exports.isStringLiteral = isStringLiteral; | ||
exports.isThisExpression = isThisExpression; | ||
exports.isTypeDeclaration = isTypeDeclaration; | ||
@@ -706,0 +714,0 @@ exports.readableNodeType = readableNodeType; |
{ | ||
"name": "@eslint-react/ast", | ||
"version": "0.10.11", | ||
"version": "0.10.12-beta.0", | ||
"description": "ESLint React's TSESTree AST primitive utility module.", | ||
@@ -44,4 +44,4 @@ "homepage": "https://github.com/rel1cx/eslint-react", | ||
"string-ts": "2.0.0", | ||
"@eslint-react/tools": "0.10.11", | ||
"@eslint-react/types": "0.10.11" | ||
"@eslint-react/tools": "0.10.12-beta.0", | ||
"@eslint-react/types": "0.10.12-beta.0" | ||
}, | ||
@@ -48,0 +48,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
213439
3216
117062
+ Added@eslint-react/tools@0.10.12-beta.0(transitive)
+ Added@eslint-react/types@0.10.12-beta.0(transitive)
+ Added@typescript-eslint/scope-manager@8.19.0(transitive)
+ Added@typescript-eslint/types@8.19.0(transitive)
+ Added@typescript-eslint/typescript-estree@8.19.0(transitive)
+ Added@typescript-eslint/utils@8.19.0(transitive)
+ Added@typescript-eslint/visitor-keys@8.19.0(transitive)
- Removed@eslint-react/tools@0.10.11(transitive)
- Removed@eslint-react/types@0.10.11(transitive)
- Removed@typescript-eslint/scope-manager@8.18.2(transitive)
- Removed@typescript-eslint/types@8.18.2(transitive)
- Removed@typescript-eslint/typescript-estree@8.18.2(transitive)
- Removed@typescript-eslint/utils@8.18.2(transitive)
- Removed@typescript-eslint/visitor-keys@8.18.2(transitive)