@eslint-react/jsx 5.30.0-beta.14 → 5.30.0-beta.16

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
@@ -395,8 +395,8 @@ export declare function findCreateElementProp(context: RuleContext, call: Create
395
395
  /**
396
396
  * Check if the node itself is passed as a children argument (the third argument
397
397
  * or later) of a `createElement` call. Contiguous TypeScript type-expression
398
- * ancestors are skipped, and the node is unwrapped before the comparison;
399
- * expressions nested inside an argument are not considered.
398
+ * and chain-expression ancestors are skipped, and the node is unwrapped before
399
+ * the comparison; expressions nested inside an argument are not considered.
400
400
  * @param context The ESLint rule context.
401
401
  * @param node The node to check; nullish values return `false`.
402
402
  * @returns `true` if the node is a direct children argument of a `createElement` call.
package/dist/index.js CHANGED
@@ -284,7 +284,7 @@ function findCreateElementProp(context, call, name) {
284
284
  function isCreateElementChildrenArgument(context, node) {
285
285
  if (node == null) return false;
286
286
  let parent = node.parent;
287
- while (Check.isTypeExpression(parent)) parent = parent.parent;
287
+ while (Check.isTypeOrChainExpression(parent)) parent = parent.parent;
288
288
  const target = Extract.unwrap(node);
289
289
  return parent?.type === AST_NODE_TYPES.CallExpression && isCreateElementCall(context, parent) && parent.arguments.slice(2).some((arg) => Extract.unwrap(arg) === target);
290
290
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/jsx",
3
- "version": "5.30.0-beta.14",
3
+ "version": "5.30.0-beta.16",
4
4
  "description": "ESLint React's TSESTree JSX utility module for static analysis of JSX patterns.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -29,8 +29,8 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@eslint-react/ast": "5.30.0-beta.14",
33
- "@eslint-react/eslint": "5.30.0-beta.14",
32
+ "@eslint-react/ast": "5.30.0-beta.16",
33
+ "@eslint-react/eslint": "5.30.0-beta.16",
34
34
  "@typescript-eslint/types": "^8.72.1",
35
35
  "@typescript-eslint/utils": "^8.72.1"
36
36
  },
@@ -41,7 +41,7 @@
41
41
  "@tsconfig/node20": "^20.1.10",
42
42
  "@types/node": "^20.19.43",
43
43
  "eslint": "^10.13.0",
44
- "tsdown": "^0.23.3",
44
+ "tsdown": "^0.23.4",
45
45
  "typescript": "6.0.3"
46
46
  },
47
47
  "peerDependencies": {