Sign In

@eslint-react/ast

Package Overview
Dependencies
Maintainers
1
Versions
2653
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eslint-react/ast - npm Package Compare versions

Comparing version
5.18.2
to
5.18.3
+8
-1
dist/index.d.ts

@@ -92,3 +92,3 @@ import { AST_NODE_TYPES, TSESTree } from "@typescript-eslint/types";

declare namespace extract_d_exports {
export { findProperty, getCalleeName, getFullyQualifiedName, getIdentifierAt, getPropertyName, unwrap };
export { findProperty, getCalleeName, getFullyQualifiedName, getIdentifierAt, getInnermostCall, getPropertyName, unwrap };
}

@@ -115,2 +115,9 @@ /**

/**
* Unwrap curried call wrappers like `connect(...)(Component)` to get the innermost call expression.
* Type expressions and chain expressions around each callee are unwrapped along the way.
* @param node The outermost call expression to inspect.
* @returns The innermost call expression, whose callee is not itself a call expression.
*/
declare function getInnermostCall(node: TSESTree.CallExpression): TSESTree.CallExpression;
/**
* Get the static name of an object property's key.

@@ -117,0 +124,0 @@ * @param property The property to inspect.

@@ -645,2 +645,3 @@ import { t as __exportAll } from "./rolldown-runtime-w6R9maHv.js";

getIdentifierAt: () => getIdentifierAt,
getInnermostCall: () => getInnermostCall,
getPropertyName: () => getPropertyName,

@@ -686,2 +687,17 @@ unwrap: () => unwrap

/**
* Unwrap curried call wrappers like `connect(...)(Component)` to get the innermost call expression.
* Type expressions and chain expressions around each callee are unwrapped along the way.
* @param node The outermost call expression to inspect.
* @returns The innermost call expression, whose callee is not itself a call expression.
*/
function getInnermostCall(node) {
let call = node;
let callee = unwrap(call.callee);
while (callee.type === AST_NODE_TYPES.CallExpression) {
call = callee;
callee = unwrap(call.callee);
}
return call;
}
/**
* Get the static name of an object property's key.

@@ -688,0 +704,0 @@ * @param property The property to inspect.

+7
-7
{
"name": "@eslint-react/ast",
"version": "5.18.2",
"version": "5.18.3",
"description": "ESLint React's TSESTree AST utility module.",

@@ -32,9 +32,9 @@ "homepage": "https://github.com/Rel1cx/eslint-react",

"dependencies": {
"@typescript-eslint/types": "^8.65.0",
"@typescript-eslint/typescript-estree": "^8.65.0",
"@typescript-eslint/utils": "^8.65.0",
"@typescript-eslint/types": "^8.66.0",
"@typescript-eslint/typescript-estree": "^8.66.0",
"@typescript-eslint/utils": "^8.66.0",
"string-ts": "^2.3.1"
},
"devDependencies": {
"@typescript-eslint/parser": "^8.65.0",
"@typescript-eslint/parser": "^8.66.0",
"eslint": "^10.8.0",

@@ -44,5 +44,5 @@ "tsdown": "^0.22.14",

"vitest": "^4.1.10",
"@local/eff": "0.0.0",
"@local/configs": "0.0.0",
"@local/testkit": "0.0.0",
"@local/configs": "0.0.0"
"@local/eff": "0.0.0"
},

@@ -49,0 +49,0 @@ "peerDependencies": {