@eslint-react/ast 2.7.5-next.5 → 2.7.5-next.7

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
@@ -22,7 +22,7 @@ declare function getClassId(node: TSESTreeClass): TSESTree.BindingName | unit;
22
22
  //#endregion
23
23
  //#region src/equal.d.ts
24
24
  /**
25
- * Determines whether node equals to another node
25
+ * Determine whether node equals to another node
26
26
  * @param a node to compare
27
27
  * @param b node to compare
28
28
  * @returns `true` if node equal
@@ -44,7 +44,7 @@ declare function getUnderlyingExpression(node: TSESTree.Node): Exclude<TSESTree.
44
44
  //#endregion
45
45
  //#region src/expression-is.d.ts
46
46
  /**
47
- * Checks if the given expression is a 'this' expression.
47
+ * Check if the given expression is a 'this' expression.
48
48
  * Unwraps any type expressions before checking.
49
49
  *
50
50
  * @param node The expression node to check
@@ -106,14 +106,14 @@ type FunctionID = ReturnType<typeof getFunctionId>;
106
106
  type FunctionInitPath = readonly [TSESTree.FunctionDeclaration] | readonly [TSESTree.VariableDeclaration, TSESTree.VariableDeclarator, TSESTreeFunction] | readonly [TSESTree.VariableDeclaration, TSESTree.VariableDeclarator, TSESTree.CallExpression, TSESTreeFunction] | readonly [TSESTree.VariableDeclaration, TSESTree.VariableDeclarator, TSESTree.CallExpression, TSESTree.CallExpression, TSESTreeFunction] | readonly [TSESTree.VariableDeclaration, TSESTree.VariableDeclarator, TSESTree.ObjectExpression, TSESTree.Property, TSESTreeFunction] | readonly [TSESTree.VariableDeclaration, TSESTree.VariableDeclarator, TSESTree.ObjectExpression, TSESTree.Property, TSESTree.CallExpression, TSESTreeFunction] | readonly [TSESTree.VariableDeclaration, TSESTree.VariableDeclarator, TSESTree.ObjectExpression, TSESTree.Property, TSESTree.CallExpression, TSESTree.CallExpression, TSESTreeFunction] | readonly [TSESTree.ClassDeclaration, TSESTree.ClassBody, TSESTree.MethodDefinition, TSESTreeFunction] | readonly [TSESTree.ClassDeclaration, TSESTree.ClassBody, TSESTree.PropertyDefinition, TSESTreeFunction];
107
107
  /**
108
108
  * Identifies the initialization path of a function node in the AST.
109
- * Determines what kind of component declaration pattern the function belongs to.
109
+ * Determine what kind of component declaration pattern the function belongs to.
110
110
  *
111
111
  * @param node The function node to analyze
112
112
  * @returns The function initialization path or unit if not identifiable
113
113
  */
114
114
  declare function getFunctionInitPath(node: TSESTreeFunction): unit | FunctionInitPath;
115
115
  /**
116
- * Checks if a specific function call exists in the function initialization path.
116
+ * Check if a specific function call exists in the function initialization path.
117
117
  * Useful for detecting HOCs like React.memo, React.forwardRef, etc.
118
118
  *
119
119
  * @param callName The name of the call to check for (e.g., "memo", "forwardRef")
@@ -250,14 +250,14 @@ declare function findParentNode(node: TSESTree.Node | unit, test: (node: TSESTre
250
250
  //#endregion
251
251
  //#region src/vitest-mock.d.ts
252
252
  /**
253
- * Checks if the given node is a `vi.mock`.
253
+ * Check if the given node is a `vi.mock`.
254
254
  * @param node The node to check
255
255
  * @returns `true` if the node is a `vi.mock`, otherwise `false`.
256
256
  * @internal
257
257
  */
258
258
  declare function isViMock(node: TSESTree.Node | null | unit): node is TSESTree.MemberExpression;
259
259
  /**
260
- * Checks if the given node is a `vi.mock` callback.
260
+ * Check if the given node is a `vi.mock` callback.
261
261
  * @param node The node to check
262
262
  * @returns `true` if the node is a `vi.mock` callback, otherwise `false`.
263
263
  * @internal
package/dist/index.js CHANGED
@@ -102,7 +102,7 @@ function getUnderlyingExpression(node) {
102
102
  //#endregion
103
103
  //#region src/equal.ts
104
104
  /**
105
- * Determines whether node equals to another node
105
+ * Determine whether node equals to another node
106
106
  * @param a node to compare
107
107
  * @param b node to compare
108
108
  * @returns `true` if node equal
@@ -143,7 +143,7 @@ const isNodeEqual = dual(2, (a, b) => {
143
143
  //#endregion
144
144
  //#region src/expression-is.ts
145
145
  /**
146
- * Checks if the given expression is a 'this' expression.
146
+ * Check if the given expression is a 'this' expression.
147
147
  * Unwraps any type expressions before checking.
148
148
  *
149
149
  * @param node The expression node to check
@@ -374,7 +374,7 @@ function getFunctionId(node) {
374
374
  //#region src/function-init-path.ts
375
375
  /**
376
376
  * Identifies the initialization path of a function node in the AST.
377
- * Determines what kind of component declaration pattern the function belongs to.
377
+ * Determine what kind of component declaration pattern the function belongs to.
378
378
  *
379
379
  * @param node The function node to analyze
380
380
  * @returns The function initialization path or unit if not identifiable
@@ -424,7 +424,7 @@ function getFunctionInitPath(node) {
424
424
  return unit;
425
425
  }
426
426
  /**
427
- * Checks if a specific function call exists in the function initialization path.
427
+ * Check if a specific function call exists in the function initialization path.
428
428
  * Useful for detecting HOCs like React.memo, React.forwardRef, etc.
429
429
  *
430
430
  * @param callName The name of the call to check for (e.g., "memo", "forwardRef")
@@ -594,7 +594,7 @@ const SEL_DISPLAY_NAME_ASSIGNMENT_EXPRESSION = [
594
594
  //#endregion
595
595
  //#region src/vitest-mock.ts
596
596
  /**
597
- * Checks if the given node is a `vi.mock`.
597
+ * Check if the given node is a `vi.mock`.
598
598
  * @param node The node to check
599
599
  * @returns `true` if the node is a `vi.mock`, otherwise `false`.
600
600
  * @internal
@@ -603,7 +603,7 @@ function isViMock(node) {
603
603
  return node != null && node.type === AST_NODE_TYPES.MemberExpression && node.object.type === AST_NODE_TYPES.Identifier && node.object.name === "vi" && node.property.type === AST_NODE_TYPES.Identifier && node.property.name === "mock";
604
604
  }
605
605
  /**
606
- * Checks if the given node is a `vi.mock` callback.
606
+ * Check if the given node is a `vi.mock` callback.
607
607
  * @param node The node to check
608
608
  * @returns `true` if the node is a `vi.mock` callback, otherwise `false`.
609
609
  * @internal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/ast",
3
- "version": "2.7.5-next.5",
3
+ "version": "2.7.5-next.7",
4
4
  "description": "ESLint React's TSESTree AST utility module.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -34,7 +34,7 @@
34
34
  "@typescript-eslint/typescript-estree": "^8.54.0",
35
35
  "@typescript-eslint/utils": "^8.54.0",
36
36
  "string-ts": "^2.3.1",
37
- "@eslint-react/eff": "2.7.5-next.5"
37
+ "@eslint-react/eff": "2.7.5-next.7"
38
38
  },
39
39
  "devDependencies": {
40
40
  "tsdown": "^0.20.1",