eslint-plugin-react-debug 5.9.5 → 5.10.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 +5 -4
  2. package/package.json +10 -10
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ import * as core from "@eslint-react/core";
4
4
  import { isUseRefCall } from "@eslint-react/core";
5
5
  import { merge } from "@eslint-react/eslint";
6
6
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
7
+ import { isInitializedFromReact } from "@eslint-react/var";
7
8
  import { findVariable } from "@typescript-eslint/utils/ast-utils";
8
9
  import { getElementFullType, isFragmentElement } from "@eslint-react/jsx";
9
10
  import { P, match } from "ts-pattern";
@@ -28,7 +29,7 @@ var __exportAll = (all, no_symbols) => {
28
29
  //#endregion
29
30
  //#region package.json
30
31
  var name$1 = "eslint-plugin-react-debug";
31
- var version = "5.9.5";
32
+ var version = "5.10.0";
32
33
 
33
34
  //#endregion
34
35
  //#region src/utils/create-rule.ts
@@ -117,9 +118,9 @@ function create$3(context) {
117
118
  function isFromReact(node, initialScope, importSource = "react") {
118
119
  const name = node.name;
119
120
  switch (true) {
120
- case node.parent.type === AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.Identifier: return core.isAPIFromReact(node.parent.object.name, initialScope, importSource);
121
- case node.parent.type === AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.JSXIdentifier: return core.isAPIFromReact(node.parent.object.name, initialScope, importSource);
122
- default: return core.isAPIFromReact(name, initialScope, importSource);
121
+ 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);
122
+ 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);
123
+ default: return isInitializedFromReact(name, initialScope, importSource);
123
124
  }
124
125
  }
125
126
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-debug",
3
- "version": "5.9.5",
3
+ "version": "5.10.0",
4
4
  "description": "ESLint React's ESLint plugin for debugging related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -41,22 +41,22 @@
41
41
  "@typescript-eslint/types": "^8.62.0",
42
42
  "@typescript-eslint/utils": "^8.62.0",
43
43
  "ts-pattern": "^5.9.0",
44
- "@eslint-react/ast": "5.9.5",
45
- "@eslint-react/core": "5.9.5",
46
- "@eslint-react/jsx": "5.9.5",
47
- "@eslint-react/shared": "5.9.5",
48
- "@eslint-react/eslint": "5.9.5"
44
+ "@eslint-react/core": "5.10.0",
45
+ "@eslint-react/eslint": "5.10.0",
46
+ "@eslint-react/jsx": "5.10.0",
47
+ "@eslint-react/ast": "5.10.0",
48
+ "@eslint-react/shared": "5.10.0",
49
+ "@eslint-react/var": "5.10.0"
49
50
  },
50
51
  "devDependencies": {
51
52
  "@types/react": "^19.2.17",
52
53
  "@types/react-dom": "^19.2.3",
53
- "@typescript-eslint/rule-tester": "^8.62.0",
54
54
  "dedent": "^1.7.2",
55
- "eslint": "^10.5.0",
55
+ "eslint": "^10.6.0",
56
56
  "tsdown": "^0.22.3",
57
57
  "typescript": "6.0.3",
58
- "@local/configs": "0.0.0",
59
- "@local/eff": "0.0.0"
58
+ "@local/eff": "0.0.0",
59
+ "@local/configs": "0.0.0"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "eslint": "*",