@eslint-react/core 2.4.0-beta.2 → 2.4.0-beta.4

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
@@ -221,14 +221,12 @@ declare function useComponentCollectorLegacy(): useComponentCollectorLegacy.Retu
221
221
  /**
222
222
  * Check whether the given node is a this.setState() call
223
223
  * @param node The node to check
224
- * @param node
225
224
  * @internal
226
225
  */
227
226
  declare function isThisSetState(node: TSESTree$1.CallExpression): boolean;
228
227
  /**
229
228
  * Check whether the given node is an assignment to this.state
230
229
  * @param node The node to check
231
- * @param node
232
230
  * @internal
233
231
  */
234
232
  declare function isAssignmentToThisState(node: TSESTree$1.AssignmentExpression): boolean;
@@ -240,9 +238,6 @@ declare function isAssignmentToThisState(node: TSESTree$1.AssignmentExpression):
240
238
  * @param context The rule context
241
239
  * @param node The function node to analyze
242
240
  * @param hint Component detection hints (bit flags) to customize detection logic
243
- * @param context
244
- * @param node
245
- * @param hint
246
241
  * @returns `true` if the node is considered a component definition
247
242
  */
248
243
  declare function isComponentDefinition(context: RuleContext, node: AST.TSESTreeFunction, hint: bigint): boolean;
package/dist/index.js CHANGED
@@ -499,9 +499,7 @@ function isJsxLike(code, node, hint = DEFAULT_JSX_DETECTION_HINT) {
499
499
  const { name } = node;
500
500
  if (name === "undefined") return !(hint & JsxDetectionHint.SkipUndefined);
501
501
  if (AST.isJSXTagNameExpression(node)) return true;
502
- const variable = findVariable(name, code.getScope(node));
503
- const variableNode = variable && getVariableDefinitionNode(variable, 0);
504
- return !!variableNode && isJsxLike(code, variableNode, hint);
502
+ return isJsxLike(code, getVariableDefinitionNode(findVariable(name, code.getScope(node)), 0), hint);
505
503
  }
506
504
  }
507
505
  return false;
@@ -804,7 +802,6 @@ const FUNCTION_PATTERNS = {
804
802
  * Checks if the given node is a function within a render method of a class component.
805
803
  *
806
804
  * @param node The AST node to check
807
- * @param node
808
805
  * @returns `true` if the node is a render function inside a class component
809
806
  *
810
807
  * @example
@@ -824,8 +821,6 @@ function isFunctionOfRenderMethod(node) {
824
821
  *
825
822
  * @param node The function node to check
826
823
  * @param hint Component detection hints as bit flags
827
- * @param node
828
- * @param hint
829
824
  * @returns `true` if the function matches an exclusion hint
830
825
  */
831
826
  function shouldExcludeBasedOnHint(node, hint) {
@@ -840,8 +835,6 @@ function shouldExcludeBasedOnHint(node, hint) {
840
835
  *
841
836
  * @param context The rule context
842
837
  * @param node The AST node to check
843
- * @param context
844
- * @param node
845
838
  * @returns `true` if the node is passed as a child to `createElement`
846
839
  */
847
840
  function isChildrenOfCreateElement(context, node) {
@@ -856,9 +849,6 @@ function isChildrenOfCreateElement(context, node) {
856
849
  * @param context The rule context
857
850
  * @param node The function node to analyze
858
851
  * @param hint Component detection hints (bit flags) to customize detection logic
859
- * @param context
860
- * @param node
861
- * @param hint
862
852
  * @returns `true` if the node is considered a component definition
863
853
  */
864
854
  function isComponentDefinition(context, node, hint) {
@@ -1105,7 +1095,6 @@ function useComponentCollectorLegacy() {
1105
1095
  /**
1106
1096
  * Check whether the given node is a this.setState() call
1107
1097
  * @param node The node to check
1108
- * @param node
1109
1098
  * @internal
1110
1099
  */
1111
1100
  function isThisSetState(node) {
@@ -1115,7 +1104,6 @@ function isThisSetState(node) {
1115
1104
  /**
1116
1105
  * Check whether the given node is an assignment to this.state
1117
1106
  * @param node The node to check
1118
- * @param node
1119
1107
  * @internal
1120
1108
  */
1121
1109
  function isAssignmentToThisState(node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "2.4.0-beta.2",
3
+ "version": "2.4.0-beta.4",
4
4
  "description": "ESLint React's ESLint utility module for static analysis of React core APIs and patterns.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -35,19 +35,19 @@
35
35
  "@typescript-eslint/utils": "^8.49.0",
36
36
  "birecord": "^0.1.1",
37
37
  "ts-pattern": "^5.9.0",
38
- "@eslint-react/ast": "2.4.0-beta.2",
39
- "@eslint-react/var": "2.4.0-beta.2",
40
- "@eslint-react/eff": "2.4.0-beta.2",
41
- "@eslint-react/shared": "2.4.0-beta.2"
42
- },
43
- "peerDependencies": {
44
- "eslint": "^8.57.0 || ^9.0.0",
45
- "typescript": ">=4.8.4 <6.0.0"
38
+ "@eslint-react/ast": "2.4.0-beta.4",
39
+ "@eslint-react/shared": "2.4.0-beta.4",
40
+ "@eslint-react/var": "2.4.0-beta.4",
41
+ "@eslint-react/eff": "2.4.0-beta.4"
46
42
  },
47
43
  "devDependencies": {
48
44
  "tsdown": "^0.17.3",
49
45
  "@local/configs": "0.0.0"
50
46
  },
47
+ "peerDependencies": {
48
+ "eslint": "^8.57.0 || ^9.0.0",
49
+ "typescript": ">=4.8.4 <6.0.0"
50
+ },
51
51
  "engines": {
52
52
  "node": ">=20.19.0"
53
53
  },