@eslint-react/ast 5.14.9 → 5.15.0
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 +1 -1
- package/dist/index.js +2 -2
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ declare function unwrap(node: TSESTree.Node): Exclude<TSESTree.Node, TSESTreeTyp
|
|
|
55
55
|
declare function getRootIdentifier(node: TSESTree.Expression | TSESTree.PrivateIdentifier): TSESTree.Identifier | null;
|
|
56
56
|
/**
|
|
57
57
|
* Get the name of a call expression's callee when it is an identifier
|
|
58
|
-
* or a member expression whose property is an identifier
|
|
58
|
+
* or a non-computed member expression whose property is an identifier
|
|
59
59
|
* @param node The call expression node
|
|
60
60
|
* @returns The callee name, or `null` if it cannot be determined
|
|
61
61
|
*/
|
package/dist/index.js
CHANGED
|
@@ -256,14 +256,14 @@ function getRootIdentifier(node) {
|
|
|
256
256
|
}
|
|
257
257
|
/**
|
|
258
258
|
* Get the name of a call expression's callee when it is an identifier
|
|
259
|
-
* or a member expression whose property is an identifier
|
|
259
|
+
* or a non-computed member expression whose property is an identifier
|
|
260
260
|
* @param node The call expression node
|
|
261
261
|
* @returns The callee name, or `null` if it cannot be determined
|
|
262
262
|
*/
|
|
263
263
|
function getCalleeName(node) {
|
|
264
264
|
const callee = unwrap(node.callee);
|
|
265
265
|
if (callee.type === AST_NODE_TYPES.Identifier) return callee.name;
|
|
266
|
-
if (callee.type === AST_NODE_TYPES.MemberExpression && callee.property.type === AST_NODE_TYPES.Identifier) return callee.property.name;
|
|
266
|
+
if (callee.type === AST_NODE_TYPES.MemberExpression && !callee.computed && callee.property.type === AST_NODE_TYPES.Identifier) return callee.property.name;
|
|
267
267
|
return null;
|
|
268
268
|
}
|
|
269
269
|
function getFullyQualifiedName(node, getText) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/ast",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.15.0",
|
|
4
4
|
"description": "ESLint React's TSESTree AST utility module.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@typescript-eslint/types": "^8.
|
|
33
|
-
"@typescript-eslint/typescript-estree": "^8.
|
|
34
|
-
"@typescript-eslint/utils": "^8.
|
|
32
|
+
"@typescript-eslint/types": "^8.64.0",
|
|
33
|
+
"@typescript-eslint/typescript-estree": "^8.64.0",
|
|
34
|
+
"@typescript-eslint/utils": "^8.64.0",
|
|
35
35
|
"string-ts": "^2.3.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@typescript-eslint/parser": "^8.
|
|
38
|
+
"@typescript-eslint/parser": "^8.64.0",
|
|
39
39
|
"eslint": "^10.7.0",
|
|
40
40
|
"tsdown": "^0.22.7",
|
|
41
41
|
"typescript": "6.0.3",
|