eslint-plugin-react-hooks-extra 2.0.0-next.173 → 2.0.0-next.175

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 +3 -3
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ const rules = { "react-hooks-extra/no-direct-set-state-in-use-effect": "warn" };
30
30
  //#endregion
31
31
  //#region package.json
32
32
  var name = "eslint-plugin-react-hooks-extra";
33
- var version = "2.0.0-next.173";
33
+ var version = "2.0.0-next.175";
34
34
 
35
35
  //#endregion
36
36
  //#region src/utils/create-rule.ts
@@ -88,7 +88,7 @@ function create(context) {
88
88
  if (setupFnRef.current === node) setupFnRef.current = null;
89
89
  };
90
90
  function isFunctionOfUseEffectSetup(node) {
91
- return node.parent?.type === AST_NODE_TYPES.CallExpression && node.parent.callee !== node && ER.isUseEffectCall(node.parent);
91
+ return node.parent?.type === AST_NODE_TYPES.CallExpression && node.parent.callee !== node && ER.isUseEffectLikeCall(node.parent);
92
92
  }
93
93
  function getCallName(node) {
94
94
  if (node.type === AST_NODE_TYPES.CallExpression) return AST.toStringFormat(node.callee, getText);
@@ -204,7 +204,7 @@ function create(context) {
204
204
  if (vd != null) getOrElseUpdate(setStateInEffectArg, vd.init, () => []).push(node);
205
205
  break;
206
206
  }
207
- if (ER.isUseEffectCall(node.parent)) getOrElseUpdate(setStateInEffectSetup, node.parent, () => []).push(node);
207
+ if (ER.isUseEffectLikeCall(node.parent)) getOrElseUpdate(setStateInEffectSetup, node.parent, () => []).push(node);
208
208
  }
209
209
  },
210
210
  "Program:exit"() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-hooks-extra",
3
- "version": "2.0.0-next.173",
3
+ "version": "2.0.0-next.175",
4
4
  "description": "ESLint React's ESLint plugin for React Hooks related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -42,12 +42,12 @@
42
42
  "@typescript-eslint/utils": "^8.42.0",
43
43
  "string-ts": "^2.2.1",
44
44
  "ts-pattern": "^5.8.0",
45
- "@eslint-react/ast": "2.0.0-next.173",
46
- "@eslint-react/core": "2.0.0-next.173",
47
- "@eslint-react/kit": "2.0.0-next.173",
48
- "@eslint-react/eff": "2.0.0-next.173",
49
- "@eslint-react/shared": "2.0.0-next.173",
50
- "@eslint-react/var": "2.0.0-next.173"
45
+ "@eslint-react/ast": "2.0.0-next.175",
46
+ "@eslint-react/core": "2.0.0-next.175",
47
+ "@eslint-react/eff": "2.0.0-next.175",
48
+ "@eslint-react/kit": "2.0.0-next.175",
49
+ "@eslint-react/shared": "2.0.0-next.175",
50
+ "@eslint-react/var": "2.0.0-next.175"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/react": "^19.1.12",