eslint-plugin-react-debug 5.18.5 → 5.18.7

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 +16 -16
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ import * as core from "@eslint-react/core";
4
4
  import { isUseRefLikeCall } from "@eslint-react/core";
5
5
  import { merge } from "@eslint-react/eslint";
6
6
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
7
+ import { Check } from "@eslint-react/ast";
7
8
  import { isInitializedFromReact } from "@eslint-react/var";
8
9
  import { findVariable } from "@typescript-eslint/utils/ast-utils";
9
10
  import { getElementFullType, isFragmentElement } from "@eslint-react/jsx";
@@ -29,7 +30,7 @@ var __exportAll = (all, no_symbols) => {
29
30
  //#endregion
30
31
  //#region package.json
31
32
  var name$1 = "eslint-plugin-react-debug";
32
- var version = "5.18.5";
33
+ var version = "5.18.7";
33
34
 
34
35
  //#endregion
35
36
  //#region src/utils/create-rule.ts
@@ -118,7 +119,7 @@ function create$3(context) {
118
119
  function isFromReact(node, initialScope, importSource = "react") {
119
120
  const name = node.name;
120
121
  switch (true) {
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.MemberExpression && node.parent.property === node && Check.isIdentifier(node.parent.object): return isInitializedFromReact(node.parent.object.name, initialScope, importSource);
122
123
  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
124
  default: return isInitializedFromReact(name, initialScope, importSource);
124
125
  }
@@ -165,7 +166,7 @@ function create$2(context) {
165
166
  function getRefInitNode(context, node, initialScope) {
166
167
  const name = node.name;
167
168
  switch (true) {
168
- case node.parent.type === AST_NODE_TYPES.MemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.Identifier: return getRefInit(context, node.parent.object.name, initialScope);
169
+ case node.parent.type === AST_NODE_TYPES.MemberExpression && node.parent.property === node && Check.isIdentifier(node.parent.object): return getRefInit(context, node.parent.object.name, initialScope);
169
170
  case node.parent.type === AST_NODE_TYPES.JSXMemberExpression && node.parent.property === node && node.parent.object.type === AST_NODE_TYPES.JSXIdentifier: return getRefInit(context, node.parent.object.name, initialScope);
170
171
  default: return getRefInit(context, name, initialScope);
171
172
  }
@@ -184,7 +185,7 @@ function getRefInit(context, name, initialScope) {
184
185
  const init = node.init;
185
186
  if (init == null) continue;
186
187
  switch (true) {
187
- case init.type === AST_NODE_TYPES.MemberExpression && init.object.type === AST_NODE_TYPES.Identifier && (init.object.name === "ref" || init.object.name.endsWith("Ref")): return init;
188
+ case init.type === AST_NODE_TYPES.MemberExpression && Check.isIdentifier(init.object) && (init.object.name === "ref" || init.object.name.endsWith("Ref")): return init;
188
189
  case init.type === AST_NODE_TYPES.CallExpression && isUseRefLikeCall(init, additionalRefHooks): return init;
189
190
  }
190
191
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-debug",
3
- "version": "5.18.5",
3
+ "version": "5.18.7",
4
4
  "description": "ESLint React's ESLint plugin for debugging related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -37,26 +37,26 @@
37
37
  "dist"
38
38
  ],
39
39
  "dependencies": {
40
- "@typescript-eslint/scope-manager": "^8.67.0",
41
- "@typescript-eslint/types": "^8.67.0",
42
- "@typescript-eslint/utils": "^8.67.0",
43
- "ts-pattern": "^5.9.0",
44
- "@eslint-react/ast": "5.18.5",
45
- "@eslint-react/core": "5.18.5",
46
- "@eslint-react/eslint": "5.18.5",
47
- "@eslint-react/jsx": "5.18.5",
48
- "@eslint-react/var": "5.18.5",
49
- "@eslint-react/shared": "5.18.5"
40
+ "@eslint-react/ast": "5.18.7",
41
+ "@eslint-react/core": "5.18.7",
42
+ "@eslint-react/eslint": "5.18.7",
43
+ "@eslint-react/jsx": "5.18.7",
44
+ "@eslint-react/shared": "5.18.7",
45
+ "@eslint-react/var": "5.18.7",
46
+ "@typescript-eslint/scope-manager": "^8.69.0",
47
+ "@typescript-eslint/types": "^8.69.0",
48
+ "@typescript-eslint/utils": "^8.69.0",
49
+ "ts-pattern": "^5.9.0"
50
50
  },
51
51
  "devDependencies": {
52
+ "@local/configs": "0.0.0",
53
+ "@local/eff": "0.0.0",
52
54
  "@types/react": "^19.2.18",
53
- "@types/react-dom": "^19.2.4",
55
+ "@types/react-dom": "^19.2.5",
54
56
  "dedent": "^1.7.2",
55
- "eslint": "^10.8.1",
57
+ "eslint": "^10.9.1",
56
58
  "tsdown": "^0.22.14",
57
- "typescript": "6.0.3",
58
- "@local/configs": "0.0.0",
59
- "@local/eff": "0.0.0"
59
+ "typescript": "6.0.3"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "eslint": "*",