eslint-plugin-react-hooks-extra 1.13.0-next.0 → 1.13.0-next.2

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
@@ -11,7 +11,7 @@ var astUtils = require('@typescript-eslint/utils/ast-utils');
11
11
 
12
12
  // package.json
13
13
  var name = "eslint-plugin-react-hooks-extra";
14
- var version = "1.13.0-next.0";
14
+ var version = "1.13.0-next.2";
15
15
  var createRule = shared.createRuleForPlugin("hooks-extra");
16
16
  function isFromHookCall(name2, context, settings, predicate = tools.F.constTrue) {
17
17
  const hookAlias = settings.additionalHooks?.[name2] ?? [];
@@ -299,6 +299,7 @@ var no_redundant_custom_hook_default = createRule({
299
299
  "Program:exit"(node) {
300
300
  const allHooks = ctx.getAllHooks(node);
301
301
  for (const { name: name2, node: node2, hookCalls } of allHooks.values()) {
302
+ if (ast.isEmptyFunction(node2)) continue;
302
303
  if (hookCalls.length > 0) continue;
303
304
  context.report({
304
305
  messageId: "noRedundantCustomHook",
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { traverseUpGuard, isFunction, getNestedIdentifiers, toReadableNodeName, is, getNestedCallExpressions, isFunctionOfImmediatelyInvoked } from '@eslint-react/ast';
1
+ import { traverseUpGuard, isFunction, getNestedIdentifiers, toReadableNodeName, isEmptyFunction, is, getNestedCallExpressions, isFunctionOfImmediatelyInvoked } from '@eslint-react/ast';
2
2
  import { isReactHookCallWithNameAlias, useHookCollector, isReactHookCall, isUseCallbackCall, isReactHookCallWithNameLoose, isUseMemoCall, isUseStateCall, isReactHookName } from '@eslint-react/core';
3
3
  import { createRuleForPlugin, decodeSettings } from '@eslint-react/shared';
4
4
  import { MutRef, O, F } from '@eslint-react/tools';
@@ -9,7 +9,7 @@ import { getStaticValue } from '@typescript-eslint/utils/ast-utils';
9
9
 
10
10
  // package.json
11
11
  var name = "eslint-plugin-react-hooks-extra";
12
- var version = "1.13.0-next.0";
12
+ var version = "1.13.0-next.2";
13
13
  var createRule = createRuleForPlugin("hooks-extra");
14
14
  function isFromHookCall(name2, context, settings, predicate = F.constTrue) {
15
15
  const hookAlias = settings.additionalHooks?.[name2] ?? [];
@@ -297,6 +297,7 @@ var no_redundant_custom_hook_default = createRule({
297
297
  "Program:exit"(node) {
298
298
  const allHooks = ctx.getAllHooks(node);
299
299
  for (const { name: name2, node: node2, hookCalls } of allHooks.values()) {
300
+ if (isEmptyFunction(node2)) continue;
300
301
  if (hookCalls.length > 0) continue;
301
302
  context.report({
302
303
  messageId: "noRedundantCustomHook",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-hooks-extra",
3
- "version": "1.13.0-next.0",
3
+ "version": "1.13.0-next.2",
4
4
  "description": "ESLint React's ESLint plugin for React Hooks related rules.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -46,13 +46,13 @@
46
46
  "@typescript-eslint/types": "^8.4.0",
47
47
  "@typescript-eslint/utils": "^8.4.0",
48
48
  "ts-pattern": "^5.3.1",
49
- "@eslint-react/core": "1.13.0-next.0",
50
- "@eslint-react/shared": "1.13.0-next.0",
51
- "@eslint-react/jsx": "1.13.0-next.0",
52
- "@eslint-react/tools": "1.13.0-next.0",
53
- "@eslint-react/types": "1.13.0-next.0",
54
- "@eslint-react/var": "1.13.0-next.0",
55
- "@eslint-react/ast": "1.13.0-next.0"
49
+ "@eslint-react/core": "1.13.0-next.2",
50
+ "@eslint-react/shared": "1.13.0-next.2",
51
+ "@eslint-react/jsx": "1.13.0-next.2",
52
+ "@eslint-react/tools": "1.13.0-next.2",
53
+ "@eslint-react/ast": "1.13.0-next.2",
54
+ "@eslint-react/var": "1.13.0-next.2",
55
+ "@eslint-react/types": "1.13.0-next.2"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/react": "^18.3.5",