eslint-plugin-react-hooks-extra 2.7.1 → 2.7.2-beta.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 +3 -3
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ const rules = { "react-hooks-extra/no-direct-set-state-in-use-effect": "warn" };
36
36
  //#endregion
37
37
  //#region package.json
38
38
  var name = "eslint-plugin-react-hooks-extra";
39
- var version = "2.7.1";
39
+ var version = "2.7.2-beta.0";
40
40
 
41
41
  //#endregion
42
42
  //#region src/utils/create-rule.ts
@@ -99,7 +99,7 @@ function create(context) {
99
99
  function isUseStateCall(node) {
100
100
  return isUseStateLikeCall(node, additionalStateHooks);
101
101
  }
102
- function isFunctionOfUseEffectSetup(node) {
102
+ function isUseEffectSetupCallback(node) {
103
103
  return node.parent?.type === AST_NODE_TYPES.CallExpression && node.parent.callee !== node && isUseEffectLikeCall(node.parent);
104
104
  }
105
105
  function getCallName(node) {
@@ -115,7 +115,7 @@ function create(context) {
115
115
  case node.async:
116
116
  case parent.type === AST_NODE_TYPES.CallExpression && isThenCall(parent): return "deferred";
117
117
  case node.type !== AST_NODE_TYPES.FunctionDeclaration && parent.type === AST_NODE_TYPES.CallExpression && parent.callee === node: return "immediate";
118
- case isFunctionOfUseEffectSetup(node): return "setup";
118
+ case isUseEffectSetupCallback(node): return "setup";
119
119
  default: return "other";
120
120
  }
121
121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-hooks-extra",
3
- "version": "2.7.1",
3
+ "version": "2.7.2-beta.0",
4
4
  "description": "ESLint React's ESLint plugin for React Hooks related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -45,11 +45,11 @@
45
45
  "@typescript-eslint/utils": "^8.53.0",
46
46
  "string-ts": "^2.3.1",
47
47
  "ts-pattern": "^5.9.0",
48
- "@eslint-react/ast": "2.7.1",
49
- "@eslint-react/core": "2.7.1",
50
- "@eslint-react/eff": "2.7.1",
51
- "@eslint-react/shared": "2.7.1",
52
- "@eslint-react/var": "2.7.1"
48
+ "@eslint-react/ast": "2.7.2-beta.0",
49
+ "@eslint-react/core": "2.7.2-beta.0",
50
+ "@eslint-react/shared": "2.7.2-beta.0",
51
+ "@eslint-react/var": "2.7.2-beta.0",
52
+ "@eslint-react/eff": "2.7.2-beta.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/react": "^19.2.8",