eslint-plugin-react-x 5.30.0-beta.24 → 5.30.0-beta.26

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 +2 -5
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -130,7 +130,7 @@ const rules$6 = {
130
130
  };
131
131
  // package.json
132
132
  var name$6 = "eslint-plugin-react-x";
133
- var version = "5.30.0-beta.24";
133
+ var version = "5.30.0-beta.26";
134
134
  // src/utils/create-rule.ts
135
135
  function getDocsUrl(ruleName) {
136
136
  return `https://eslint-react.xyz/docs/rules/${ruleName}`;
@@ -7227,9 +7227,7 @@ function inferCreatedComponents(context, componentUsages, isInsideRender) {
7227
7227
  for (const usage of componentUsages) {
7228
7228
  const variable = findVariable(context.sourceCode.getScope(usage.node), usage.name);
7229
7229
  if (variable == null) continue;
7230
- const def = variable.defs.at(0);
7231
- if (def == null) continue;
7232
- if (!isInsideRender(def.node)) continue;
7230
+ if (!variable.defs.some((def) => isInsideRender(def.node))) continue;
7233
7231
  const { creationNode, isDynamic } = resolveDynamicComponentOrigin(context, variable, isInsideRender);
7234
7232
  if (!isDynamic) continue;
7235
7233
  effects.push({
@@ -7266,7 +7264,6 @@ function create$3(context) {
7266
7264
  messageId: "default",
7267
7265
  node: effect.node
7268
7266
  });
7269
- if (effect.creationNode == null) continue;
7270
7267
  if (reportedCreations.has(effect.creationNode)) continue;
7271
7268
  reportedCreations.add(effect.creationNode);
7272
7269
  context.report({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "5.30.0-beta.24",
3
+ "version": "5.30.0-beta.26",
4
4
  "description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
5
5
  "keywords": [
6
6
  "react",
@@ -36,12 +36,12 @@
36
36
  "dist"
37
37
  ],
38
38
  "dependencies": {
39
- "@eslint-react/ast": "5.30.0-beta.24",
40
- "@eslint-react/core": "5.30.0-beta.24",
41
- "@eslint-react/eslint": "5.30.0-beta.24",
42
- "@eslint-react/jsx": "5.30.0-beta.24",
43
- "@eslint-react/shared": "5.30.0-beta.24",
44
- "@eslint-react/var": "5.30.0-beta.24",
39
+ "@eslint-react/ast": "5.30.0-beta.26",
40
+ "@eslint-react/core": "5.30.0-beta.26",
41
+ "@eslint-react/eslint": "5.30.0-beta.26",
42
+ "@eslint-react/jsx": "5.30.0-beta.26",
43
+ "@eslint-react/shared": "5.30.0-beta.26",
44
+ "@eslint-react/var": "5.30.0-beta.26",
45
45
  "@typescript-eslint/scope-manager": "^8.72.1",
46
46
  "@typescript-eslint/types": "^8.72.1",
47
47
  "@typescript-eslint/utils": "^8.72.1",