eslint-plugin-react-hooks-extra 1.5.7-next.5 → 1.5.8-next.1

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.d.mts CHANGED
@@ -1,14 +1,14 @@
1
- import { ESLintUtils } from '@typescript-eslint/utils';
1
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
2
2
 
3
3
  declare const meta: {
4
4
  readonly name: string;
5
5
  readonly version: string;
6
6
  };
7
7
  declare const rules: {
8
- readonly "ensure-custom-hooks-using-other-hooks": ESLintUtils.RuleModule<"ENSURE_CUSTOM_HOOKS_USING_OTHER_HOOKS", [], ESLintUtils.RuleListener>;
9
- readonly "ensure-use-callback-has-non-empty-deps": ESLintUtils.RuleModule<"ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS", [], ESLintUtils.RuleListener>;
10
- readonly "ensure-use-memo-has-non-empty-deps": ESLintUtils.RuleModule<"ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS", [], ESLintUtils.RuleListener>;
11
- readonly "prefer-use-state-lazy-initialization": ESLintUtils.RuleModule<"PREFER_USE_STATE_LAZY_INITIALIZATION", [], ESLintUtils.RuleListener>;
8
+ readonly "ensure-custom-hooks-using-other-hooks": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_CUSTOM_HOOKS_USING_OTHER_HOOKS", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
9
+ readonly "ensure-use-callback-has-non-empty-deps": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
10
+ readonly "ensure-use-memo-has-non-empty-deps": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
11
+ readonly "prefer-use-state-lazy-initialization": _typescript_eslint_utils_ts_eslint.RuleModule<"PREFER_USE_STATE_LAZY_INITIALIZATION", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
12
12
  };
13
13
 
14
14
  export { meta, rules };
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { ESLintUtils } from '@typescript-eslint/utils';
1
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
2
2
 
3
3
  declare const meta: {
4
4
  readonly name: string;
5
5
  readonly version: string;
6
6
  };
7
7
  declare const rules: {
8
- readonly "ensure-custom-hooks-using-other-hooks": ESLintUtils.RuleModule<"ENSURE_CUSTOM_HOOKS_USING_OTHER_HOOKS", [], ESLintUtils.RuleListener>;
9
- readonly "ensure-use-callback-has-non-empty-deps": ESLintUtils.RuleModule<"ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS", [], ESLintUtils.RuleListener>;
10
- readonly "ensure-use-memo-has-non-empty-deps": ESLintUtils.RuleModule<"ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS", [], ESLintUtils.RuleListener>;
11
- readonly "prefer-use-state-lazy-initialization": ESLintUtils.RuleModule<"PREFER_USE_STATE_LAZY_INITIALIZATION", [], ESLintUtils.RuleListener>;
8
+ readonly "ensure-custom-hooks-using-other-hooks": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_CUSTOM_HOOKS_USING_OTHER_HOOKS", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
9
+ readonly "ensure-use-callback-has-non-empty-deps": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
10
+ readonly "ensure-use-memo-has-non-empty-deps": _typescript_eslint_utils_ts_eslint.RuleModule<"ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
11
+ readonly "prefer-use-state-lazy-initialization": _typescript_eslint_utils_ts_eslint.RuleModule<"PREFER_USE_STATE_LAZY_INITIALIZATION", [], _typescript_eslint_utils_ts_eslint.RuleListener>;
12
12
  };
13
13
 
14
14
  export { meta, rules };
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ var __export = (target, all2) => {
15
15
 
16
16
  // package.json
17
17
  var name = "eslint-plugin-react-hooks-extra";
18
- var version = "1.5.7-next.5";
18
+ var version = "1.5.8-next.1";
19
19
  var createRule = shared.createRuleForPlugin("hooks-extra");
20
20
 
21
21
  // src/rules/ensure-custom-hooks-using-other-hooks.ts
@@ -56,7 +56,7 @@ var ensure_custom_hooks_using_other_hooks_default = createRule({
56
56
  }
57
57
  });
58
58
 
59
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Function.js
59
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Function.js
60
60
  var Function_exports = {};
61
61
  __export(Function_exports, {
62
62
  SK: () => SK,
@@ -155,7 +155,7 @@ var constUndefined = /* @__PURE__ */ constant(void 0);
155
155
  var constVoid = constUndefined;
156
156
  var flip = (f) => (...b2) => (...a) => f(...a)(...b2);
157
157
  var compose = /* @__PURE__ */ dual(2, (ab, bc) => (a) => bc(ab(a)));
158
- var absurd = (_) => {
158
+ var absurd = (_2) => {
159
159
  throw new Error("Called `absurd` function which should be uncallable");
160
160
  };
161
161
  var tupled = (f) => (a) => f(...a);
@@ -229,13 +229,13 @@ function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
229
229
  return;
230
230
  }
231
231
  var hole = /* @__PURE__ */ unsafeCoerce(absurd);
232
- var SK = (_, b2) => b2;
232
+ var SK = (_2, b2) => b2;
233
233
 
234
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/internal/version.js
235
- var moduleVersion = "2.4.14";
234
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/internal/version.js
235
+ var moduleVersion = "2.4.15";
236
236
  var getCurrentVersion = () => moduleVersion;
237
237
 
238
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/GlobalValue.js
238
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/GlobalValue.js
239
239
  var globalStoreId = /* @__PURE__ */ Symbol.for(`effect/GlobalValue/globalStoreId/${/* @__PURE__ */ getCurrentVersion()}`);
240
240
  if (!(globalStoreId in globalThis)) {
241
241
  globalThis[globalStoreId] = /* @__PURE__ */ new Map();
@@ -248,14 +248,14 @@ var globalValue = (id, compute) => {
248
248
  return globalStore.get(id);
249
249
  };
250
250
 
251
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Predicate.js
251
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Predicate.js
252
252
  var isFunction2 = isFunction;
253
253
  var isRecordOrArray = (input) => typeof input === "object" && input !== null;
254
254
  var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
255
255
  var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
256
256
  var isNullable = (input) => input === null || input === void 0;
257
257
 
258
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Utils.js
258
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Utils.js
259
259
  var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
260
260
  var GenKindImpl = class {
261
261
  value;
@@ -272,19 +272,19 @@ var GenKindImpl = class {
272
272
  * @since 2.0.0
273
273
  */
274
274
  get _R() {
275
- return (_) => _;
275
+ return (_2) => _2;
276
276
  }
277
277
  /**
278
278
  * @since 2.0.0
279
279
  */
280
280
  get _O() {
281
- return (_) => _;
281
+ return (_2) => _2;
282
282
  }
283
283
  /**
284
284
  * @since 2.0.0
285
285
  */
286
286
  get _E() {
287
- return (_) => _;
287
+ return (_2) => _2;
288
288
  }
289
289
  /**
290
290
  * @since 2.0.0
@@ -475,7 +475,7 @@ function add64(out, aHi, aLo, bHi, bLo) {
475
475
  out[1] = lo;
476
476
  }
477
477
 
478
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Hash.js
478
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Hash.js
479
479
  var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
480
480
  var pcgr = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/pcgr"), () => new PCGRandom());
481
481
  var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
@@ -561,7 +561,7 @@ var cached = function() {
561
561
  return hash2;
562
562
  };
563
563
 
564
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Equal.js
564
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Equal.js
565
565
  var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
566
566
  function equals() {
567
567
  if (arguments.length === 1) {
@@ -587,10 +587,10 @@ function compareBoth(self, that) {
587
587
  var isEqual = (u2) => hasProperty(u2, symbol2);
588
588
  var equivalence = () => equals;
589
589
 
590
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Equivalence.js
590
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Equivalence.js
591
591
  var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
592
592
 
593
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Inspectable.js
593
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Inspectable.js
594
594
  var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
595
595
  var toJSON = (x2) => {
596
596
  if (hasProperty(x2, "toJSON") && isFunction2(x2["toJSON"]) && x2["toJSON"].length === 0) {
@@ -602,7 +602,7 @@ var toJSON = (x2) => {
602
602
  };
603
603
  var format = (x2) => JSON.stringify(x2, null, 2);
604
604
 
605
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Option.js
605
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Option.js
606
606
  var Option_exports = {};
607
607
  __export(Option_exports, {
608
608
  Do: () => Do,
@@ -664,7 +664,7 @@ __export(Option_exports, {
664
664
  zipWith: () => zipWith
665
665
  });
666
666
 
667
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Pipeable.js
667
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Pipeable.js
668
668
  var pipeArguments = (self, args) => {
669
669
  switch (args.length) {
670
670
  case 1:
@@ -695,47 +695,47 @@ var pipeArguments = (self, args) => {
695
695
  }
696
696
  };
697
697
 
698
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/internal/effectable.js
698
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/internal/effectable.js
699
699
  var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
700
700
  var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
701
701
  var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
702
702
  var ChannelTypeId = /* @__PURE__ */ Symbol.for("effect/Channel");
703
703
  var effectVariance = {
704
704
  /* c8 ignore next */
705
- _R: (_) => _,
705
+ _R: (_2) => _2,
706
706
  /* c8 ignore next */
707
- _E: (_) => _,
707
+ _E: (_2) => _2,
708
708
  /* c8 ignore next */
709
- _A: (_) => _,
709
+ _A: (_2) => _2,
710
710
  _V: /* @__PURE__ */ getCurrentVersion()
711
711
  };
712
712
  var sinkVariance = {
713
713
  /* c8 ignore next */
714
- _A: (_) => _,
714
+ _A: (_2) => _2,
715
715
  /* c8 ignore next */
716
- _In: (_) => _,
716
+ _In: (_2) => _2,
717
717
  /* c8 ignore next */
718
- _L: (_) => _,
718
+ _L: (_2) => _2,
719
719
  /* c8 ignore next */
720
- _E: (_) => _,
720
+ _E: (_2) => _2,
721
721
  /* c8 ignore next */
722
- _R: (_) => _
722
+ _R: (_2) => _2
723
723
  };
724
724
  var channelVariance = {
725
725
  /* c8 ignore next */
726
- _Env: (_) => _,
726
+ _Env: (_2) => _2,
727
727
  /* c8 ignore next */
728
- _InErr: (_) => _,
728
+ _InErr: (_2) => _2,
729
729
  /* c8 ignore next */
730
- _InElem: (_) => _,
730
+ _InElem: (_2) => _2,
731
731
  /* c8 ignore next */
732
- _InDone: (_) => _,
732
+ _InDone: (_2) => _2,
733
733
  /* c8 ignore next */
734
- _OutErr: (_) => _,
734
+ _OutErr: (_2) => _2,
735
735
  /* c8 ignore next */
736
- _OutElem: (_) => _,
736
+ _OutElem: (_2) => _2,
737
737
  /* c8 ignore next */
738
- _OutDone: (_) => _
738
+ _OutDone: (_2) => _2
739
739
  };
740
740
  var EffectPrototype = {
741
741
  [EffectTypeId]: effectVariance,
@@ -753,12 +753,12 @@ var EffectPrototype = {
753
753
  }
754
754
  };
755
755
 
756
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/internal/option.js
756
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/internal/option.js
757
757
  var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
758
758
  var CommonProto = {
759
759
  ...EffectPrototype,
760
760
  [TypeId]: {
761
- _A: (_) => _
761
+ _A: (_2) => _2
762
762
  },
763
763
  [NodeInspectSymbol]() {
764
764
  return this.toJSON();
@@ -811,12 +811,12 @@ var some = (value) => {
811
811
  return a;
812
812
  };
813
813
 
814
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/internal/either.js
814
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/internal/either.js
815
815
  var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
816
816
  var CommonProto2 = {
817
817
  ...EffectPrototype,
818
818
  [TypeId2]: {
819
- _R: (_) => _
819
+ _R: (_2) => _2
820
820
  },
821
821
  [NodeInspectSymbol]() {
822
822
  return this.toJSON();
@@ -875,10 +875,10 @@ var right = (right2) => {
875
875
  var getLeft = (self) => isRight(self) ? none : some(self.left);
876
876
  var getRight = (self) => isLeft(self) ? none : some(self.right);
877
877
 
878
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Order.js
878
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Order.js
879
879
  var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
880
880
 
881
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Option.js
881
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Option.js
882
882
  var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Option");
883
883
  var none2 = () => none;
884
884
  var some2 = some;
@@ -1042,49 +1042,49 @@ var gen = (f) => {
1042
1042
  }
1043
1043
  };
1044
1044
 
1045
- // ../../../node_modules/.pnpm/ts-pattern@5.0.8/node_modules/ts-pattern/dist/index.js
1045
+ // ../../../node_modules/.pnpm/ts-pattern@5.1.0/node_modules/ts-pattern/dist/index.js
1046
1046
  var t = Symbol.for("@ts-pattern/matcher");
1047
1047
  var e = Symbol.for("@ts-pattern/isVariadic");
1048
1048
  var n = "@ts-pattern/anonymous-select-key";
1049
1049
  var r = (t2) => Boolean(t2 && "object" == typeof t2);
1050
1050
  var i = (e2) => e2 && !!e2[t];
1051
- var s = (n2, o2, c2) => {
1051
+ var o = (n2, s2, c2) => {
1052
1052
  if (i(n2)) {
1053
- const e2 = n2[t](), { matched: r2, selections: i2 } = e2.match(o2);
1053
+ const e2 = n2[t](), { matched: r2, selections: i2 } = e2.match(s2);
1054
1054
  return r2 && i2 && Object.keys(i2).forEach((t2) => c2(t2, i2[t2])), r2;
1055
1055
  }
1056
1056
  if (r(n2)) {
1057
- if (!r(o2))
1057
+ if (!r(s2))
1058
1058
  return false;
1059
1059
  if (Array.isArray(n2)) {
1060
- if (!Array.isArray(o2))
1060
+ if (!Array.isArray(s2))
1061
1061
  return false;
1062
1062
  let t2 = [], r2 = [], a = [];
1063
- for (const s2 of n2.keys()) {
1064
- const o3 = n2[s2];
1065
- i(o3) && o3[e] ? a.push(o3) : a.length ? r2.push(o3) : t2.push(o3);
1063
+ for (const o2 of n2.keys()) {
1064
+ const s3 = n2[o2];
1065
+ i(s3) && s3[e] ? a.push(s3) : a.length ? r2.push(s3) : t2.push(s3);
1066
1066
  }
1067
1067
  if (a.length) {
1068
1068
  if (a.length > 1)
1069
1069
  throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
1070
- if (o2.length < t2.length + r2.length)
1070
+ if (s2.length < t2.length + r2.length)
1071
1071
  return false;
1072
- const e2 = o2.slice(0, t2.length), n3 = 0 === r2.length ? [] : o2.slice(-r2.length), i2 = o2.slice(t2.length, 0 === r2.length ? Infinity : -r2.length);
1073
- return t2.every((t3, n4) => s(t3, e2[n4], c2)) && r2.every((t3, e3) => s(t3, n3[e3], c2)) && (0 === a.length || s(a[0], i2, c2));
1072
+ const e2 = s2.slice(0, t2.length), n3 = 0 === r2.length ? [] : s2.slice(-r2.length), i2 = s2.slice(t2.length, 0 === r2.length ? Infinity : -r2.length);
1073
+ return t2.every((t3, n4) => o(t3, e2[n4], c2)) && r2.every((t3, e3) => o(t3, n3[e3], c2)) && (0 === a.length || o(a[0], i2, c2));
1074
1074
  }
1075
- return n2.length === o2.length && n2.every((t3, e2) => s(t3, o2[e2], c2));
1075
+ return n2.length === s2.length && n2.every((t3, e2) => o(t3, s2[e2], c2));
1076
1076
  }
1077
1077
  return Object.keys(n2).every((e2) => {
1078
1078
  const r2 = n2[e2];
1079
- return (e2 in o2 || i(a = r2) && "optional" === a[t]().matcherType) && s(r2, o2[e2], c2);
1079
+ return (e2 in s2 || i(a = r2) && "optional" === a[t]().matcherType) && o(r2, s2[e2], c2);
1080
1080
  var a;
1081
1081
  });
1082
1082
  }
1083
- return Object.is(o2, n2);
1083
+ return Object.is(s2, n2);
1084
1084
  };
1085
- var o = (e2) => {
1086
- var n2, s2, a;
1087
- return r(e2) ? i(e2) ? null != (n2 = null == (s2 = (a = e2[t]()).getSelectionKeys) ? void 0 : s2.call(a)) ? n2 : [] : Array.isArray(e2) ? c(e2, o) : c(Object.values(e2), o) : [];
1085
+ var s = (e2) => {
1086
+ var n2, o2, a;
1087
+ return r(e2) ? i(e2) ? null != (n2 = null == (o2 = (a = e2[t]()).getSelectionKeys) ? void 0 : o2.call(a)) ? n2 : [] : Array.isArray(e2) ? c(e2, s) : c(Object.values(e2), s) : [];
1088
1088
  };
1089
1089
  var c = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
1090
1090
  function u(t2) {
@@ -1096,8 +1096,8 @@ function l(e2) {
1096
1096
  const r2 = (t3, e3) => {
1097
1097
  n2[t3] = e3;
1098
1098
  };
1099
- return void 0 === t2 ? (o(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: s(e2, t2, r2), selections: n2 };
1100
- }, getSelectionKeys: () => o(e2), matcherType: "optional" }) });
1099
+ return void 0 === t2 ? (s(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: o(e2, t2, r2), selections: n2 };
1100
+ }, getSelectionKeys: () => s(e2), matcherType: "optional" }) });
1101
1101
  }
1102
1102
  function m(...e2) {
1103
1103
  return u({ [t]: () => ({ match: (t2) => {
@@ -1105,8 +1105,8 @@ function m(...e2) {
1105
1105
  const r2 = (t3, e3) => {
1106
1106
  n2[t3] = e3;
1107
1107
  };
1108
- return { matched: e2.every((e3) => s(e3, t2, r2)), selections: n2 };
1109
- }, getSelectionKeys: () => c(e2, o), matcherType: "and" }) });
1108
+ return { matched: e2.every((e3) => o(e3, t2, r2)), selections: n2 };
1109
+ }, getSelectionKeys: () => c(e2, s), matcherType: "and" }) });
1110
1110
  }
1111
1111
  function d(...e2) {
1112
1112
  return u({ [t]: () => ({ match: (t2) => {
@@ -1114,8 +1114,8 @@ function d(...e2) {
1114
1114
  const r2 = (t3, e3) => {
1115
1115
  n2[t3] = e3;
1116
1116
  };
1117
- return c(e2, o).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => s(e3, t2, r2)), selections: n2 };
1118
- }, getSelectionKeys: () => c(e2, o), matcherType: "or" }) });
1117
+ return c(e2, s).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => o(e3, t2, r2)), selections: n2 };
1118
+ }, getSelectionKeys: () => c(e2, s), matcherType: "or" }) });
1119
1119
  }
1120
1120
  function y(e2) {
1121
1121
  return { [t]: () => ({ match: (t2) => ({ matched: Boolean(e2(t2)) }) }) };
@@ -1124,10 +1124,10 @@ function p(...e2) {
1124
1124
  const r2 = "string" == typeof e2[0] ? e2[0] : void 0, i2 = 2 === e2.length ? e2[1] : "string" == typeof e2[0] ? void 0 : e2[0];
1125
1125
  return u({ [t]: () => ({ match: (t2) => {
1126
1126
  let e3 = { [null != r2 ? r2 : n]: t2 };
1127
- return { matched: void 0 === i2 || s(i2, t2, (t3, n2) => {
1127
+ return { matched: void 0 === i2 || o(i2, t2, (t3, n2) => {
1128
1128
  e3[t3] = n2;
1129
1129
  }), selections: e3 };
1130
- }, getSelectionKeys: () => [null != r2 ? r2 : n].concat(void 0 === i2 ? [] : o(i2)) }) });
1130
+ }, getSelectionKeys: () => [null != r2 ? r2 : n].concat(void 0 === i2 ? [] : s(i2)) }) });
1131
1131
  }
1132
1132
  function v(t2) {
1133
1133
  return "number" == typeof t2;
@@ -1168,11 +1168,14 @@ u(y(function(t2) {
1168
1168
  u(y(function(t2) {
1169
1169
  return null == t2;
1170
1170
  }));
1171
+ u(y(function(t2) {
1172
+ return null != t2;
1173
+ }));
1171
1174
  var W = { matched: false, value: void 0 };
1172
- function N(t2) {
1173
- return new $(t2, W);
1175
+ function $(t2) {
1176
+ return new z(t2, W);
1174
1177
  }
1175
- var $ = class _$ {
1178
+ var z = class _z {
1176
1179
  constructor(t2, e2) {
1177
1180
  this.input = void 0, this.state = void 0, this.input = t2, this.state = e2;
1178
1181
  }
@@ -1182,17 +1185,17 @@ var $ = class _$ {
1182
1185
  const e2 = t2[t2.length - 1], r2 = [t2[0]];
1183
1186
  let i2;
1184
1187
  3 === t2.length && "function" == typeof t2[1] ? i2 = t2[1] : t2.length > 2 && r2.push(...t2.slice(1, t2.length - 1));
1185
- let o2 = false, c2 = {};
1188
+ let s2 = false, c2 = {};
1186
1189
  const a = (t3, e3) => {
1187
- o2 = true, c2[t3] = e3;
1188
- }, u2 = !r2.some((t3) => s(t3, this.input, a)) || i2 && !Boolean(i2(this.input)) ? W : { matched: true, value: e2(o2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
1189
- return new _$(this.input, u2);
1190
+ s2 = true, c2[t3] = e3;
1191
+ }, u2 = !r2.some((t3) => o(t3, this.input, a)) || i2 && !Boolean(i2(this.input)) ? W : { matched: true, value: e2(s2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
1192
+ return new _z(this.input, u2);
1190
1193
  }
1191
1194
  when(t2, e2) {
1192
1195
  if (this.state.matched)
1193
1196
  return this;
1194
1197
  const n2 = Boolean(t2(this.input));
1195
- return new _$(this.input, n2 ? { matched: true, value: e2(this.input, this.input) } : W);
1198
+ return new _z(this.input, n2 ? { matched: true, value: e2(this.input, this.input) } : W);
1196
1199
  }
1197
1200
  otherwise(t2) {
1198
1201
  return this.state.matched ? this.state.value : t2(this.input);
@@ -1243,7 +1246,7 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
1243
1246
  if (!core.isUseCallbackCall(node, context, pragma) && !alias.some(Function_exports.flip(core.isReactHookCallWithNameLoose)(node))) {
1244
1247
  return;
1245
1248
  }
1246
- const [_, deps] = node.arguments;
1249
+ const [_2, deps] = node.arguments;
1247
1250
  if (!deps) {
1248
1251
  context.report({
1249
1252
  messageId: "ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS",
@@ -1252,7 +1255,7 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
1252
1255
  return;
1253
1256
  }
1254
1257
  const maybeDescriptor = Function_exports.pipe(
1255
- N(deps).with({ type: ast.NodeType.ArrayExpression }, Option_exports.some).with({ type: ast.NodeType.Identifier }, (n2) => {
1258
+ $(deps).with({ type: ast.NodeType.ArrayExpression }, Option_exports.some).with({ type: ast.NodeType.Identifier }, (n2) => {
1256
1259
  return Function_exports.pipe(
1257
1260
  _var.findVariable(n2.name, initialScope),
1258
1261
  Option_exports.flatMap(_var.getVariableInit(0)),
@@ -1295,7 +1298,7 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
1295
1298
  return;
1296
1299
  if (!core.isUseMemoCall(node, context, pragma) && !alias.some(Function_exports.flip(core.isReactHookCallWithNameLoose)(node)))
1297
1300
  return;
1298
- const [_, deps] = node.arguments;
1301
+ const [_2, deps] = node.arguments;
1299
1302
  if (!deps) {
1300
1303
  context.report({
1301
1304
  messageId: "ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS",
@@ -1304,7 +1307,7 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
1304
1307
  return;
1305
1308
  }
1306
1309
  const maybeDescriptor = Function_exports.pipe(
1307
- N(deps).with({ type: ast.NodeType.ArrayExpression }, Option_exports.some).with({ type: ast.NodeType.Identifier }, (n2) => {
1310
+ $(deps).with({ type: ast.NodeType.ArrayExpression }, Option_exports.some).with({ type: ast.NodeType.Identifier }, (n2) => {
1308
1311
  return Function_exports.pipe(
1309
1312
  _var.findVariable(n2.name, initialScope),
1310
1313
  Option_exports.flatMap(_var.getVariableInit(0)),
package/dist/index.mjs CHANGED
@@ -13,7 +13,7 @@ var __export = (target, all2) => {
13
13
 
14
14
  // package.json
15
15
  var name = "eslint-plugin-react-hooks-extra";
16
- var version = "1.5.7-next.5";
16
+ var version = "1.5.8-next.1";
17
17
  var createRule = createRuleForPlugin("hooks-extra");
18
18
 
19
19
  // src/rules/ensure-custom-hooks-using-other-hooks.ts
@@ -54,7 +54,7 @@ var ensure_custom_hooks_using_other_hooks_default = createRule({
54
54
  }
55
55
  });
56
56
 
57
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Function.js
57
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Function.js
58
58
  var Function_exports = {};
59
59
  __export(Function_exports, {
60
60
  SK: () => SK,
@@ -153,7 +153,7 @@ var constUndefined = /* @__PURE__ */ constant(void 0);
153
153
  var constVoid = constUndefined;
154
154
  var flip = (f) => (...b2) => (...a) => f(...a)(...b2);
155
155
  var compose = /* @__PURE__ */ dual(2, (ab, bc) => (a) => bc(ab(a)));
156
- var absurd = (_) => {
156
+ var absurd = (_2) => {
157
157
  throw new Error("Called `absurd` function which should be uncallable");
158
158
  };
159
159
  var tupled = (f) => (a) => f(...a);
@@ -227,13 +227,13 @@ function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
227
227
  return;
228
228
  }
229
229
  var hole = /* @__PURE__ */ unsafeCoerce(absurd);
230
- var SK = (_, b2) => b2;
230
+ var SK = (_2, b2) => b2;
231
231
 
232
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/internal/version.js
233
- var moduleVersion = "2.4.14";
232
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/internal/version.js
233
+ var moduleVersion = "2.4.15";
234
234
  var getCurrentVersion = () => moduleVersion;
235
235
 
236
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/GlobalValue.js
236
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/GlobalValue.js
237
237
  var globalStoreId = /* @__PURE__ */ Symbol.for(`effect/GlobalValue/globalStoreId/${/* @__PURE__ */ getCurrentVersion()}`);
238
238
  if (!(globalStoreId in globalThis)) {
239
239
  globalThis[globalStoreId] = /* @__PURE__ */ new Map();
@@ -246,14 +246,14 @@ var globalValue = (id, compute) => {
246
246
  return globalStore.get(id);
247
247
  };
248
248
 
249
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Predicate.js
249
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Predicate.js
250
250
  var isFunction2 = isFunction;
251
251
  var isRecordOrArray = (input) => typeof input === "object" && input !== null;
252
252
  var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
253
253
  var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
254
254
  var isNullable = (input) => input === null || input === void 0;
255
255
 
256
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Utils.js
256
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Utils.js
257
257
  var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
258
258
  var GenKindImpl = class {
259
259
  value;
@@ -270,19 +270,19 @@ var GenKindImpl = class {
270
270
  * @since 2.0.0
271
271
  */
272
272
  get _R() {
273
- return (_) => _;
273
+ return (_2) => _2;
274
274
  }
275
275
  /**
276
276
  * @since 2.0.0
277
277
  */
278
278
  get _O() {
279
- return (_) => _;
279
+ return (_2) => _2;
280
280
  }
281
281
  /**
282
282
  * @since 2.0.0
283
283
  */
284
284
  get _E() {
285
- return (_) => _;
285
+ return (_2) => _2;
286
286
  }
287
287
  /**
288
288
  * @since 2.0.0
@@ -473,7 +473,7 @@ function add64(out, aHi, aLo, bHi, bLo) {
473
473
  out[1] = lo;
474
474
  }
475
475
 
476
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Hash.js
476
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Hash.js
477
477
  var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
478
478
  var pcgr = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/pcgr"), () => new PCGRandom());
479
479
  var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
@@ -559,7 +559,7 @@ var cached = function() {
559
559
  return hash2;
560
560
  };
561
561
 
562
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Equal.js
562
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Equal.js
563
563
  var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
564
564
  function equals() {
565
565
  if (arguments.length === 1) {
@@ -585,10 +585,10 @@ function compareBoth(self, that) {
585
585
  var isEqual = (u2) => hasProperty(u2, symbol2);
586
586
  var equivalence = () => equals;
587
587
 
588
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Equivalence.js
588
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Equivalence.js
589
589
  var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
590
590
 
591
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Inspectable.js
591
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Inspectable.js
592
592
  var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
593
593
  var toJSON = (x2) => {
594
594
  if (hasProperty(x2, "toJSON") && isFunction2(x2["toJSON"]) && x2["toJSON"].length === 0) {
@@ -600,7 +600,7 @@ var toJSON = (x2) => {
600
600
  };
601
601
  var format = (x2) => JSON.stringify(x2, null, 2);
602
602
 
603
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Option.js
603
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Option.js
604
604
  var Option_exports = {};
605
605
  __export(Option_exports, {
606
606
  Do: () => Do,
@@ -662,7 +662,7 @@ __export(Option_exports, {
662
662
  zipWith: () => zipWith
663
663
  });
664
664
 
665
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Pipeable.js
665
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Pipeable.js
666
666
  var pipeArguments = (self, args) => {
667
667
  switch (args.length) {
668
668
  case 1:
@@ -693,47 +693,47 @@ var pipeArguments = (self, args) => {
693
693
  }
694
694
  };
695
695
 
696
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/internal/effectable.js
696
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/internal/effectable.js
697
697
  var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
698
698
  var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
699
699
  var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
700
700
  var ChannelTypeId = /* @__PURE__ */ Symbol.for("effect/Channel");
701
701
  var effectVariance = {
702
702
  /* c8 ignore next */
703
- _R: (_) => _,
703
+ _R: (_2) => _2,
704
704
  /* c8 ignore next */
705
- _E: (_) => _,
705
+ _E: (_2) => _2,
706
706
  /* c8 ignore next */
707
- _A: (_) => _,
707
+ _A: (_2) => _2,
708
708
  _V: /* @__PURE__ */ getCurrentVersion()
709
709
  };
710
710
  var sinkVariance = {
711
711
  /* c8 ignore next */
712
- _A: (_) => _,
712
+ _A: (_2) => _2,
713
713
  /* c8 ignore next */
714
- _In: (_) => _,
714
+ _In: (_2) => _2,
715
715
  /* c8 ignore next */
716
- _L: (_) => _,
716
+ _L: (_2) => _2,
717
717
  /* c8 ignore next */
718
- _E: (_) => _,
718
+ _E: (_2) => _2,
719
719
  /* c8 ignore next */
720
- _R: (_) => _
720
+ _R: (_2) => _2
721
721
  };
722
722
  var channelVariance = {
723
723
  /* c8 ignore next */
724
- _Env: (_) => _,
724
+ _Env: (_2) => _2,
725
725
  /* c8 ignore next */
726
- _InErr: (_) => _,
726
+ _InErr: (_2) => _2,
727
727
  /* c8 ignore next */
728
- _InElem: (_) => _,
728
+ _InElem: (_2) => _2,
729
729
  /* c8 ignore next */
730
- _InDone: (_) => _,
730
+ _InDone: (_2) => _2,
731
731
  /* c8 ignore next */
732
- _OutErr: (_) => _,
732
+ _OutErr: (_2) => _2,
733
733
  /* c8 ignore next */
734
- _OutElem: (_) => _,
734
+ _OutElem: (_2) => _2,
735
735
  /* c8 ignore next */
736
- _OutDone: (_) => _
736
+ _OutDone: (_2) => _2
737
737
  };
738
738
  var EffectPrototype = {
739
739
  [EffectTypeId]: effectVariance,
@@ -751,12 +751,12 @@ var EffectPrototype = {
751
751
  }
752
752
  };
753
753
 
754
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/internal/option.js
754
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/internal/option.js
755
755
  var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
756
756
  var CommonProto = {
757
757
  ...EffectPrototype,
758
758
  [TypeId]: {
759
- _A: (_) => _
759
+ _A: (_2) => _2
760
760
  },
761
761
  [NodeInspectSymbol]() {
762
762
  return this.toJSON();
@@ -809,12 +809,12 @@ var some = (value) => {
809
809
  return a;
810
810
  };
811
811
 
812
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/internal/either.js
812
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/internal/either.js
813
813
  var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
814
814
  var CommonProto2 = {
815
815
  ...EffectPrototype,
816
816
  [TypeId2]: {
817
- _R: (_) => _
817
+ _R: (_2) => _2
818
818
  },
819
819
  [NodeInspectSymbol]() {
820
820
  return this.toJSON();
@@ -873,10 +873,10 @@ var right = (right2) => {
873
873
  var getLeft = (self) => isRight(self) ? none : some(self.left);
874
874
  var getRight = (self) => isLeft(self) ? none : some(self.right);
875
875
 
876
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Order.js
876
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Order.js
877
877
  var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
878
878
 
879
- // ../../../node_modules/.pnpm/effect@2.4.14/node_modules/effect/dist/esm/Option.js
879
+ // ../../../node_modules/.pnpm/effect@2.4.15/node_modules/effect/dist/esm/Option.js
880
880
  var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Option");
881
881
  var none2 = () => none;
882
882
  var some2 = some;
@@ -1040,49 +1040,49 @@ var gen = (f) => {
1040
1040
  }
1041
1041
  };
1042
1042
 
1043
- // ../../../node_modules/.pnpm/ts-pattern@5.0.8/node_modules/ts-pattern/dist/index.js
1043
+ // ../../../node_modules/.pnpm/ts-pattern@5.1.0/node_modules/ts-pattern/dist/index.js
1044
1044
  var t = Symbol.for("@ts-pattern/matcher");
1045
1045
  var e = Symbol.for("@ts-pattern/isVariadic");
1046
1046
  var n = "@ts-pattern/anonymous-select-key";
1047
1047
  var r = (t2) => Boolean(t2 && "object" == typeof t2);
1048
1048
  var i = (e2) => e2 && !!e2[t];
1049
- var s = (n2, o2, c2) => {
1049
+ var o = (n2, s2, c2) => {
1050
1050
  if (i(n2)) {
1051
- const e2 = n2[t](), { matched: r2, selections: i2 } = e2.match(o2);
1051
+ const e2 = n2[t](), { matched: r2, selections: i2 } = e2.match(s2);
1052
1052
  return r2 && i2 && Object.keys(i2).forEach((t2) => c2(t2, i2[t2])), r2;
1053
1053
  }
1054
1054
  if (r(n2)) {
1055
- if (!r(o2))
1055
+ if (!r(s2))
1056
1056
  return false;
1057
1057
  if (Array.isArray(n2)) {
1058
- if (!Array.isArray(o2))
1058
+ if (!Array.isArray(s2))
1059
1059
  return false;
1060
1060
  let t2 = [], r2 = [], a = [];
1061
- for (const s2 of n2.keys()) {
1062
- const o3 = n2[s2];
1063
- i(o3) && o3[e] ? a.push(o3) : a.length ? r2.push(o3) : t2.push(o3);
1061
+ for (const o2 of n2.keys()) {
1062
+ const s3 = n2[o2];
1063
+ i(s3) && s3[e] ? a.push(s3) : a.length ? r2.push(s3) : t2.push(s3);
1064
1064
  }
1065
1065
  if (a.length) {
1066
1066
  if (a.length > 1)
1067
1067
  throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
1068
- if (o2.length < t2.length + r2.length)
1068
+ if (s2.length < t2.length + r2.length)
1069
1069
  return false;
1070
- const e2 = o2.slice(0, t2.length), n3 = 0 === r2.length ? [] : o2.slice(-r2.length), i2 = o2.slice(t2.length, 0 === r2.length ? Infinity : -r2.length);
1071
- return t2.every((t3, n4) => s(t3, e2[n4], c2)) && r2.every((t3, e3) => s(t3, n3[e3], c2)) && (0 === a.length || s(a[0], i2, c2));
1070
+ const e2 = s2.slice(0, t2.length), n3 = 0 === r2.length ? [] : s2.slice(-r2.length), i2 = s2.slice(t2.length, 0 === r2.length ? Infinity : -r2.length);
1071
+ return t2.every((t3, n4) => o(t3, e2[n4], c2)) && r2.every((t3, e3) => o(t3, n3[e3], c2)) && (0 === a.length || o(a[0], i2, c2));
1072
1072
  }
1073
- return n2.length === o2.length && n2.every((t3, e2) => s(t3, o2[e2], c2));
1073
+ return n2.length === s2.length && n2.every((t3, e2) => o(t3, s2[e2], c2));
1074
1074
  }
1075
1075
  return Object.keys(n2).every((e2) => {
1076
1076
  const r2 = n2[e2];
1077
- return (e2 in o2 || i(a = r2) && "optional" === a[t]().matcherType) && s(r2, o2[e2], c2);
1077
+ return (e2 in s2 || i(a = r2) && "optional" === a[t]().matcherType) && o(r2, s2[e2], c2);
1078
1078
  var a;
1079
1079
  });
1080
1080
  }
1081
- return Object.is(o2, n2);
1081
+ return Object.is(s2, n2);
1082
1082
  };
1083
- var o = (e2) => {
1084
- var n2, s2, a;
1085
- return r(e2) ? i(e2) ? null != (n2 = null == (s2 = (a = e2[t]()).getSelectionKeys) ? void 0 : s2.call(a)) ? n2 : [] : Array.isArray(e2) ? c(e2, o) : c(Object.values(e2), o) : [];
1083
+ var s = (e2) => {
1084
+ var n2, o2, a;
1085
+ return r(e2) ? i(e2) ? null != (n2 = null == (o2 = (a = e2[t]()).getSelectionKeys) ? void 0 : o2.call(a)) ? n2 : [] : Array.isArray(e2) ? c(e2, s) : c(Object.values(e2), s) : [];
1086
1086
  };
1087
1087
  var c = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
1088
1088
  function u(t2) {
@@ -1094,8 +1094,8 @@ function l(e2) {
1094
1094
  const r2 = (t3, e3) => {
1095
1095
  n2[t3] = e3;
1096
1096
  };
1097
- return void 0 === t2 ? (o(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: s(e2, t2, r2), selections: n2 };
1098
- }, getSelectionKeys: () => o(e2), matcherType: "optional" }) });
1097
+ return void 0 === t2 ? (s(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: o(e2, t2, r2), selections: n2 };
1098
+ }, getSelectionKeys: () => s(e2), matcherType: "optional" }) });
1099
1099
  }
1100
1100
  function m(...e2) {
1101
1101
  return u({ [t]: () => ({ match: (t2) => {
@@ -1103,8 +1103,8 @@ function m(...e2) {
1103
1103
  const r2 = (t3, e3) => {
1104
1104
  n2[t3] = e3;
1105
1105
  };
1106
- return { matched: e2.every((e3) => s(e3, t2, r2)), selections: n2 };
1107
- }, getSelectionKeys: () => c(e2, o), matcherType: "and" }) });
1106
+ return { matched: e2.every((e3) => o(e3, t2, r2)), selections: n2 };
1107
+ }, getSelectionKeys: () => c(e2, s), matcherType: "and" }) });
1108
1108
  }
1109
1109
  function d(...e2) {
1110
1110
  return u({ [t]: () => ({ match: (t2) => {
@@ -1112,8 +1112,8 @@ function d(...e2) {
1112
1112
  const r2 = (t3, e3) => {
1113
1113
  n2[t3] = e3;
1114
1114
  };
1115
- return c(e2, o).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => s(e3, t2, r2)), selections: n2 };
1116
- }, getSelectionKeys: () => c(e2, o), matcherType: "or" }) });
1115
+ return c(e2, s).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => o(e3, t2, r2)), selections: n2 };
1116
+ }, getSelectionKeys: () => c(e2, s), matcherType: "or" }) });
1117
1117
  }
1118
1118
  function y(e2) {
1119
1119
  return { [t]: () => ({ match: (t2) => ({ matched: Boolean(e2(t2)) }) }) };
@@ -1122,10 +1122,10 @@ function p(...e2) {
1122
1122
  const r2 = "string" == typeof e2[0] ? e2[0] : void 0, i2 = 2 === e2.length ? e2[1] : "string" == typeof e2[0] ? void 0 : e2[0];
1123
1123
  return u({ [t]: () => ({ match: (t2) => {
1124
1124
  let e3 = { [null != r2 ? r2 : n]: t2 };
1125
- return { matched: void 0 === i2 || s(i2, t2, (t3, n2) => {
1125
+ return { matched: void 0 === i2 || o(i2, t2, (t3, n2) => {
1126
1126
  e3[t3] = n2;
1127
1127
  }), selections: e3 };
1128
- }, getSelectionKeys: () => [null != r2 ? r2 : n].concat(void 0 === i2 ? [] : o(i2)) }) });
1128
+ }, getSelectionKeys: () => [null != r2 ? r2 : n].concat(void 0 === i2 ? [] : s(i2)) }) });
1129
1129
  }
1130
1130
  function v(t2) {
1131
1131
  return "number" == typeof t2;
@@ -1166,11 +1166,14 @@ u(y(function(t2) {
1166
1166
  u(y(function(t2) {
1167
1167
  return null == t2;
1168
1168
  }));
1169
+ u(y(function(t2) {
1170
+ return null != t2;
1171
+ }));
1169
1172
  var W = { matched: false, value: void 0 };
1170
- function N(t2) {
1171
- return new $(t2, W);
1173
+ function $(t2) {
1174
+ return new z(t2, W);
1172
1175
  }
1173
- var $ = class _$ {
1176
+ var z = class _z {
1174
1177
  constructor(t2, e2) {
1175
1178
  this.input = void 0, this.state = void 0, this.input = t2, this.state = e2;
1176
1179
  }
@@ -1180,17 +1183,17 @@ var $ = class _$ {
1180
1183
  const e2 = t2[t2.length - 1], r2 = [t2[0]];
1181
1184
  let i2;
1182
1185
  3 === t2.length && "function" == typeof t2[1] ? i2 = t2[1] : t2.length > 2 && r2.push(...t2.slice(1, t2.length - 1));
1183
- let o2 = false, c2 = {};
1186
+ let s2 = false, c2 = {};
1184
1187
  const a = (t3, e3) => {
1185
- o2 = true, c2[t3] = e3;
1186
- }, u2 = !r2.some((t3) => s(t3, this.input, a)) || i2 && !Boolean(i2(this.input)) ? W : { matched: true, value: e2(o2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
1187
- return new _$(this.input, u2);
1188
+ s2 = true, c2[t3] = e3;
1189
+ }, u2 = !r2.some((t3) => o(t3, this.input, a)) || i2 && !Boolean(i2(this.input)) ? W : { matched: true, value: e2(s2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
1190
+ return new _z(this.input, u2);
1188
1191
  }
1189
1192
  when(t2, e2) {
1190
1193
  if (this.state.matched)
1191
1194
  return this;
1192
1195
  const n2 = Boolean(t2(this.input));
1193
- return new _$(this.input, n2 ? { matched: true, value: e2(this.input, this.input) } : W);
1196
+ return new _z(this.input, n2 ? { matched: true, value: e2(this.input, this.input) } : W);
1194
1197
  }
1195
1198
  otherwise(t2) {
1196
1199
  return this.state.matched ? this.state.value : t2(this.input);
@@ -1241,7 +1244,7 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
1241
1244
  if (!isUseCallbackCall(node, context, pragma) && !alias.some(Function_exports.flip(isReactHookCallWithNameLoose)(node))) {
1242
1245
  return;
1243
1246
  }
1244
- const [_, deps] = node.arguments;
1247
+ const [_2, deps] = node.arguments;
1245
1248
  if (!deps) {
1246
1249
  context.report({
1247
1250
  messageId: "ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS",
@@ -1250,7 +1253,7 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
1250
1253
  return;
1251
1254
  }
1252
1255
  const maybeDescriptor = Function_exports.pipe(
1253
- N(deps).with({ type: NodeType.ArrayExpression }, Option_exports.some).with({ type: NodeType.Identifier }, (n2) => {
1256
+ $(deps).with({ type: NodeType.ArrayExpression }, Option_exports.some).with({ type: NodeType.Identifier }, (n2) => {
1254
1257
  return Function_exports.pipe(
1255
1258
  findVariable(n2.name, initialScope),
1256
1259
  Option_exports.flatMap(getVariableInit(0)),
@@ -1293,7 +1296,7 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
1293
1296
  return;
1294
1297
  if (!isUseMemoCall(node, context, pragma) && !alias.some(Function_exports.flip(isReactHookCallWithNameLoose)(node)))
1295
1298
  return;
1296
- const [_, deps] = node.arguments;
1299
+ const [_2, deps] = node.arguments;
1297
1300
  if (!deps) {
1298
1301
  context.report({
1299
1302
  messageId: "ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS",
@@ -1302,7 +1305,7 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
1302
1305
  return;
1303
1306
  }
1304
1307
  const maybeDescriptor = Function_exports.pipe(
1305
- N(deps).with({ type: NodeType.ArrayExpression }, Option_exports.some).with({ type: NodeType.Identifier }, (n2) => {
1308
+ $(deps).with({ type: NodeType.ArrayExpression }, Option_exports.some).with({ type: NodeType.Identifier }, (n2) => {
1306
1309
  return Function_exports.pipe(
1307
1310
  findVariable(n2.name, initialScope),
1308
1311
  Option_exports.flatMap(getVariableInit(0)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-hooks-extra",
3
- "version": "1.5.7-next.5",
3
+ "version": "1.5.8-next.1",
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": {
@@ -35,22 +35,22 @@
35
35
  "./package.json"
36
36
  ],
37
37
  "dependencies": {
38
- "@typescript-eslint/parser": "7.4.0",
39
- "@typescript-eslint/scope-manager": "7.4.0",
40
- "@typescript-eslint/type-utils": "7.4.0",
41
- "@typescript-eslint/types": "7.4.0",
42
- "@typescript-eslint/utils": "7.4.0",
38
+ "@typescript-eslint/parser": "7.5.0",
39
+ "@typescript-eslint/scope-manager": "7.5.0",
40
+ "@typescript-eslint/type-utils": "7.5.0",
41
+ "@typescript-eslint/types": "7.5.0",
42
+ "@typescript-eslint/utils": "7.5.0",
43
43
  "string-ts": "2.1.0",
44
- "@eslint-react/core": "1.5.7-next.5",
45
- "@eslint-react/shared": "1.5.7-next.5",
46
- "@eslint-react/tools": "1.5.7-next.5",
47
- "@eslint-react/ast": "1.5.7-next.5",
48
- "@eslint-react/var": "1.5.7-next.5",
49
- "@eslint-react/types": "1.5.7-next.5",
50
- "@eslint-react/jsx": "1.5.7-next.5"
44
+ "@eslint-react/ast": "1.5.8-next.1",
45
+ "@eslint-react/core": "1.5.8-next.1",
46
+ "@eslint-react/jsx": "1.5.8-next.1",
47
+ "@eslint-react/shared": "1.5.8-next.1",
48
+ "@eslint-react/tools": "1.5.8-next.1",
49
+ "@eslint-react/types": "1.5.8-next.1",
50
+ "@eslint-react/var": "1.5.8-next.1"
51
51
  },
52
52
  "devDependencies": {
53
- "effect": "2.4.14"
53
+ "effect": "2.4.15"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "eslint": ">=8.57.0",