eslint-plugin-react-x 2.6.2 → 2.6.3-beta.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -5
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ var __exportAll = (all, symbols) => {
34
34
  //#endregion
35
35
  //#region package.json
36
36
  var name$6 = "eslint-plugin-react-x";
37
- var version = "2.6.2";
37
+ var version = "2.6.3-beta.0";
38
38
 
39
39
  //#endregion
40
40
  //#region src/utils/create-rule.ts
@@ -1214,7 +1214,7 @@ function create$36(context) {
1214
1214
  break;
1215
1215
  }
1216
1216
  default: {
1217
- const call = AST.findParentNode(jsxElement, AST.isArrayMapCall);
1217
+ const call = AST.findParentNode(jsxElement, AST.isArrayMapCallLoose);
1218
1218
  const iter = AST.findParentNode(jsxElement, (n) => n === call || AST.isFunction(n));
1219
1219
  if (!AST.isFunction(iter)) return;
1220
1220
  const arg0 = call?.arguments[0];
@@ -1615,7 +1615,7 @@ function create$30(context) {
1615
1615
  CallExpression(node) {
1616
1616
  state.isWithinChildrenToArray ||= isChildrenToArrayCall(context, node);
1617
1617
  if (state.isWithinChildrenToArray) return;
1618
- const callback = match(node).when(AST.isArrayMapCall, (n) => n.arguments[0]).when(AST.isArrayFromCall, (n) => n.arguments[1]).otherwise(() => null);
1618
+ const callback = match(node).when(AST.isArrayMapCallLoose, (n) => n.arguments[0]).when(AST.isArrayFromCallLoose, (n) => n.arguments[1]).otherwise(() => null);
1619
1619
  if (!AST.isFunction(callback)) return;
1620
1620
  const body = callback.body;
1621
1621
  if (body.type === AST_NODE_TYPES.BlockStatement) {
@@ -2120,8 +2120,9 @@ function create$20(context) {
2120
2120
  } };
2121
2121
  }
2122
2122
  function isArrayMethodCallback(node) {
2123
- if (node.parent?.type !== AST_NODE_TYPES.CallExpression) return false;
2124
- if (!AST.isArrayMapCall(node.parent) && !AST.isArrayFromCall(node.parent)) return false;
2123
+ const parent = node.parent;
2124
+ if (parent?.type !== AST_NODE_TYPES.CallExpression) return false;
2125
+ if (!AST.isArrayMapCallLoose(parent) && !AST.isArrayFromCallLoose(parent)) return false;
2125
2126
  return AST.isOneOf([AST_NODE_TYPES.ArrowFunctionExpression, AST_NODE_TYPES.FunctionExpression])(AST.getUnderlyingExpression(node));
2126
2127
  }
2127
2128
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "2.6.2",
3
+ "version": "2.6.3-beta.0",
4
4
  "description": "A set of composable ESLint rules for for libraries and frameworks that use React as a UI runtime.",
5
5
  "keywords": [
6
6
  "react",
@@ -46,11 +46,11 @@
46
46
  "string-ts": "^2.3.1",
47
47
  "ts-api-utils": "^2.4.0",
48
48
  "ts-pattern": "^5.9.0",
49
- "@eslint-react/ast": "2.6.2",
50
- "@eslint-react/shared": "2.6.2",
51
- "@eslint-react/eff": "2.6.2",
52
- "@eslint-react/var": "2.6.2",
53
- "@eslint-react/core": "2.6.2"
49
+ "@eslint-react/ast": "2.6.3-beta.0",
50
+ "@eslint-react/core": "2.6.3-beta.0",
51
+ "@eslint-react/eff": "2.6.3-beta.0",
52
+ "@eslint-react/var": "2.6.3-beta.0",
53
+ "@eslint-react/shared": "2.6.3-beta.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/react": "^19.2.8",