eslint-plugin-react-hooks-extra 1.6.1-next.2 → 1.6.1-next.3

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.
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ var astUtils = require('@typescript-eslint/utils/ast-utils');
9
9
 
10
10
  // package.json
11
11
  var name = "eslint-plugin-react-hooks-extra";
12
- var version = "1.6.1-next.2";
12
+ var version = "1.6.1-next.3";
13
13
  var createRule = shared.createRuleForPlugin("hooks-extra");
14
14
  function isFromUseStateCall(context, useStateAlias) {
15
15
  return (topLevelId) => {
@@ -239,11 +239,7 @@ function isSetStateCall(context, useStateAlias) {
239
239
  };
240
240
  }
241
241
  function isThenCall(node) {
242
- if (node.callee.type !== ast.NodeType.MemberExpression) return false;
243
- return a({
244
- type: ast.NodeType.Identifier,
245
- name: "then"
246
- }, node.callee.property);
242
+ return node.callee.type === ast.NodeType.MemberExpression && node.callee.property.type === ast.NodeType.Identifier && node.callee.property.name === "then";
247
243
  }
248
244
 
249
245
  // src/rules/ensure-custom-hooks-using-other-hooks.ts
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import { getStaticValue } from '@typescript-eslint/utils/ast-utils';
7
7
 
8
8
  // package.json
9
9
  var name = "eslint-plugin-react-hooks-extra";
10
- var version = "1.6.1-next.2";
10
+ var version = "1.6.1-next.3";
11
11
  var createRule = createRuleForPlugin("hooks-extra");
12
12
  function isFromUseStateCall(context, useStateAlias) {
13
13
  return (topLevelId) => {
@@ -237,11 +237,7 @@ function isSetStateCall(context, useStateAlias) {
237
237
  };
238
238
  }
239
239
  function isThenCall(node) {
240
- if (node.callee.type !== NodeType.MemberExpression) return false;
241
- return a({
242
- type: NodeType.Identifier,
243
- name: "then"
244
- }, node.callee.property);
240
+ return node.callee.type === NodeType.MemberExpression && node.callee.property.type === NodeType.Identifier && node.callee.property.name === "then";
245
241
  }
246
242
 
247
243
  // src/rules/ensure-custom-hooks-using-other-hooks.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-hooks-extra",
3
- "version": "1.6.1-next.2",
3
+ "version": "1.6.1-next.3",
4
4
  "description": "ESLint React's ESLint plugin for React Hooks related rules.",
5
5
  "homepage": "https://github.com/rel1cx/eslint-react",
6
6
  "bugs": {
@@ -39,13 +39,13 @@
39
39
  "@typescript-eslint/type-utils": "^7.17.0",
40
40
  "@typescript-eslint/types": "^7.17.0",
41
41
  "@typescript-eslint/utils": "^7.17.0",
42
- "@eslint-react/core": "1.6.1-next.2",
43
- "@eslint-react/jsx": "1.6.1-next.2",
44
- "@eslint-react/ast": "1.6.1-next.2",
45
- "@eslint-react/shared": "1.6.1-next.2",
46
- "@eslint-react/types": "1.6.1-next.2",
47
- "@eslint-react/var": "1.6.1-next.2",
48
- "@eslint-react/tools": "1.6.1-next.2"
42
+ "@eslint-react/ast": "1.6.1-next.3",
43
+ "@eslint-react/core": "1.6.1-next.3",
44
+ "@eslint-react/jsx": "1.6.1-next.3",
45
+ "@eslint-react/shared": "1.6.1-next.3",
46
+ "@eslint-react/types": "1.6.1-next.3",
47
+ "@eslint-react/tools": "1.6.1-next.3",
48
+ "@eslint-react/var": "1.6.1-next.3"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/react": "^18.3.3",