eslint-plugin-react-debug 2.4.0-next.12 → 2.4.0-next.13

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 +5 -8
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -41,7 +41,7 @@ const settings = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
41
41
  //#endregion
42
42
  //#region package.json
43
43
  var name = "eslint-plugin-react-debug";
44
- var version = "2.4.0-next.12";
44
+ var version = "2.4.0-next.13";
45
45
 
46
46
  //#endregion
47
47
  //#region src/utils/create-rule.ts
@@ -182,10 +182,7 @@ function create$1(context) {
182
182
  }) }
183
183
  });
184
184
  }
185
- return {
186
- Identifier: visitorFunction,
187
- JSXIdentifier: visitorFunction
188
- };
185
+ return Object.fromEntries(["Identifier", "JSXIdentifier"].map((type) => [type, visitorFunction]));
189
186
  }
190
187
  /**
191
188
  * Check if an identifier node is initialized from React
@@ -197,9 +194,9 @@ function create$1(context) {
197
194
  function isFromReact(node, importSource, initialScope) {
198
195
  const name$2 = node.name;
199
196
  switch (true) {
200
- case node.parent.type === AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.Identifier: return isInitializedFromReact(node.parent.object.name, importSource, initialScope);
201
- case node.parent.type === AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.JSXIdentifier: return isInitializedFromReact(node.parent.object.name, importSource, initialScope);
202
- default: return isInitializedFromReact(name$2, importSource, initialScope);
197
+ case node.parent.type === AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.Identifier: return isInitializedFromReact(node.parent.object.name, initialScope, importSource);
198
+ case node.parent.type === AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.JSXIdentifier: return isInitializedFromReact(node.parent.object.name, initialScope, importSource);
199
+ default: return isInitializedFromReact(name$2, initialScope, importSource);
203
200
  }
204
201
  }
205
202
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-debug",
3
- "version": "2.4.0-next.12",
3
+ "version": "2.4.0-next.13",
4
4
  "description": "ESLint React's ESLint plugin for debugging related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -44,11 +44,11 @@
44
44
  "@typescript-eslint/utils": "^8.50.0",
45
45
  "string-ts": "^2.3.1",
46
46
  "ts-pattern": "^5.9.0",
47
- "@eslint-react/ast": "2.4.0-next.12",
48
- "@eslint-react/eff": "2.4.0-next.12",
49
- "@eslint-react/shared": "2.4.0-next.12",
50
- "@eslint-react/var": "2.4.0-next.12",
51
- "@eslint-react/core": "2.4.0-next.12"
47
+ "@eslint-react/ast": "2.4.0-next.13",
48
+ "@eslint-react/eff": "2.4.0-next.13",
49
+ "@eslint-react/shared": "2.4.0-next.13",
50
+ "@eslint-react/core": "2.4.0-next.13",
51
+ "@eslint-react/var": "2.4.0-next.13"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/react": "^19.2.7",