@eslint-react/ast 5.14.9 → 5.14.10

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 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.14.9",
3
+ "version": "5.14.10",
4
4
  "description": "ESLint React's TSESTree AST utility module.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {