eslint-plugin-react-hooks-extra 1.5.11-beta.3 → 1.5.11-beta.8

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
@@ -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.11-beta.3";
18
+ var version = "1.5.11-beta.8";
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
  defaultOptions: []
57
57
  });
58
58
 
59
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Function.js
59
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Function.js
60
60
  var Function_exports = {};
61
61
  __export(Function_exports, {
62
62
  SK: () => SK,
@@ -231,14 +231,25 @@ function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
231
231
  var hole = /* @__PURE__ */ unsafeCoerce(absurd);
232
232
  var SK = (_2, b2) => b2;
233
233
 
234
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Equivalence.js
234
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Equivalence.js
235
235
  var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
236
236
 
237
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/internal/version.js
238
- var moduleVersion = "3.0.7";
237
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/internal/doNotation.js
238
+ var let_ = (map2) => dual(3, (self, name2, f) => map2(self, (a) => Object.assign({}, a, {
239
+ [name2]: f(a)
240
+ })));
241
+ var bindTo = (map2) => dual(2, (self, name2) => map2(self, (a) => ({
242
+ [name2]: a
243
+ })));
244
+ var bind = (map2, flatMap2) => dual(3, (self, name2, f) => flatMap2(self, (a) => map2(f(a), (b2) => Object.assign({}, a, {
245
+ [name2]: b2
246
+ }))));
247
+
248
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/internal/version.js
249
+ var moduleVersion = "3.1.2";
239
250
  var getCurrentVersion = () => moduleVersion;
240
251
 
241
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/GlobalValue.js
252
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/GlobalValue.js
242
253
  var globalStoreId = /* @__PURE__ */ Symbol.for(`effect/GlobalValue/globalStoreId/${/* @__PURE__ */ getCurrentVersion()}`);
243
254
  if (!(globalStoreId in globalThis)) {
244
255
  globalThis[globalStoreId] = /* @__PURE__ */ new Map();
@@ -251,17 +262,17 @@ var globalValue = (id, compute) => {
251
262
  return globalStore.get(id);
252
263
  };
253
264
 
254
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Predicate.js
265
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Predicate.js
255
266
  var isFunction2 = isFunction;
256
267
  var isRecordOrArray = (input) => typeof input === "object" && input !== null;
257
268
  var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
258
269
  var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
259
270
  var isNullable = (input) => input === null || input === void 0;
260
271
 
261
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/internal/errors.js
272
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/internal/errors.js
262
273
  var getBugErrorMessage = (message) => `BUG: ${message} - please report an issue at https://github.com/Effect-TS/effect/issues`;
263
274
 
264
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Utils.js
275
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Utils.js
265
276
  var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
266
277
  var isGenKind = (u2) => isObject(u2) && GenKindTypeId in u2;
267
278
  var GenKindImpl = class {
@@ -500,8 +511,12 @@ function yieldWrapGet(self) {
500
511
  }
501
512
  throw new Error(getBugErrorMessage("yieldWrapGet"));
502
513
  }
514
+ var structuralRegionState = /* @__PURE__ */ globalValue("effect/Utils/isStructuralRegion", () => ({
515
+ enabled: false,
516
+ tester: void 0
517
+ }));
503
518
 
504
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Hash.js
519
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Hash.js
505
520
  var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
506
521
  var pcgr = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/pcgr"), () => new PCGRandom());
507
522
  var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
@@ -535,6 +550,9 @@ var hash = (self) => {
535
550
  }
536
551
  };
537
552
  var random = (self) => {
553
+ if (structuralRegionState.enabled === true) {
554
+ return 0;
555
+ }
538
556
  if (!randomHashCache.has(self)) {
539
557
  randomHashCache.set(self, number(pcgr.integer(Number.MAX_SAFE_INTEGER)));
540
558
  }
@@ -567,27 +585,39 @@ var cached = function() {
567
585
  if (arguments.length === 1) {
568
586
  const self2 = arguments[0];
569
587
  return function(hash3) {
570
- Object.defineProperty(self2, symbol, {
571
- value() {
572
- return hash3;
573
- },
574
- enumerable: false
575
- });
588
+ const original2 = self2[symbol].bind(self2);
589
+ if (structuralRegionState.enabled === false) {
590
+ Object.defineProperty(self2, symbol, {
591
+ value() {
592
+ if (structuralRegionState.enabled === true) {
593
+ return original2();
594
+ }
595
+ return hash3;
596
+ },
597
+ enumerable: false
598
+ });
599
+ }
576
600
  return hash3;
577
601
  };
578
602
  }
579
603
  const self = arguments[0];
580
604
  const hash2 = arguments[1];
581
- Object.defineProperty(self, symbol, {
582
- value() {
583
- return hash2;
584
- },
585
- enumerable: false
586
- });
605
+ const original = self[symbol].bind(self);
606
+ if (structuralRegionState.enabled === false) {
607
+ Object.defineProperty(self, symbol, {
608
+ value() {
609
+ if (structuralRegionState.enabled === true) {
610
+ return original();
611
+ }
612
+ return hash2;
613
+ },
614
+ enumerable: false
615
+ });
616
+ }
587
617
  return hash2;
588
618
  };
589
619
 
590
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Equal.js
620
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Equal.js
591
621
  var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
592
622
  function equals() {
593
623
  if (arguments.length === 1) {
@@ -603,17 +633,37 @@ function compareBoth(self, that) {
603
633
  if (selfType !== typeof that) {
604
634
  return false;
605
635
  }
606
- if ((selfType === "object" || selfType === "function") && self !== null && that !== null) {
607
- if (isEqual(self) && isEqual(that)) {
608
- return hash(self) === hash(that) && self[symbol2](that);
636
+ if (selfType === "object" || selfType === "function") {
637
+ if (self !== null && that !== null) {
638
+ if (isEqual(self) && isEqual(that)) {
639
+ return hash(self) === hash(that) && self[symbol2](that);
640
+ }
641
+ }
642
+ if (structuralRegionState.enabled) {
643
+ if (Array.isArray(self) && Array.isArray(that)) {
644
+ return self.length === that.length && self.every((v2, i2) => compareBoth(v2, that[i2]));
645
+ }
646
+ if (Object.getPrototypeOf(self) === Object.prototype && Object.getPrototypeOf(self) === Object.prototype) {
647
+ const keysSelf = Object.keys(self);
648
+ const keysThat = Object.keys(that);
649
+ if (keysSelf.length === keysThat.length) {
650
+ for (const key of keysSelf) {
651
+ if (!(key in that && compareBoth(self[key], that[key]))) {
652
+ return structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
653
+ }
654
+ }
655
+ return true;
656
+ }
657
+ }
658
+ return structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
609
659
  }
610
660
  }
611
- return false;
661
+ return structuralRegionState.enabled && structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
612
662
  }
613
663
  var isEqual = (u2) => hasProperty(u2, symbol2);
614
664
  var equivalence = () => equals;
615
665
 
616
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Inspectable.js
666
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Inspectable.js
617
667
  var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
618
668
  var toJSON = (x2) => {
619
669
  if (hasProperty(x2, "toJSON") && isFunction2(x2["toJSON"]) && x2["toJSON"].length === 0) {
@@ -625,7 +675,7 @@ var toJSON = (x2) => {
625
675
  };
626
676
  var format = (x2) => JSON.stringify(x2, null, 2);
627
677
 
628
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Pipeable.js
678
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Pipeable.js
629
679
  var pipeArguments = (self, args) => {
630
680
  switch (args.length) {
631
681
  case 1:
@@ -656,7 +706,7 @@ var pipeArguments = (self, args) => {
656
706
  }
657
707
  };
658
708
 
659
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/internal/effectable.js
709
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/internal/effectable.js
660
710
  var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
661
711
  var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
662
712
  var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
@@ -717,7 +767,7 @@ var EffectPrototype = {
717
767
  }
718
768
  };
719
769
 
720
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/internal/option.js
770
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/internal/option.js
721
771
  var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
722
772
  var CommonProto = {
723
773
  ...EffectPrototype,
@@ -775,7 +825,7 @@ var some = (value) => {
775
825
  return a;
776
826
  };
777
827
 
778
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/internal/either.js
828
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/internal/either.js
779
829
  var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
780
830
  var CommonProto2 = {
781
831
  ...EffectPrototype,
@@ -839,7 +889,7 @@ var right = (right2) => {
839
889
  var getLeft = (self) => isRight(self) ? none : some(self.left);
840
890
  var getRight = (self) => isLeft(self) ? none : some(self.right);
841
891
 
842
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Option.js
892
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Option.js
843
893
  var Option_exports = {};
844
894
  __export(Option_exports, {
845
895
  Do: () => Do,
@@ -849,8 +899,8 @@ __export(Option_exports, {
849
899
  ap: () => ap,
850
900
  as: () => as,
851
901
  asVoid: () => asVoid,
852
- bind: () => bind,
853
- bindTo: () => bindTo,
902
+ bind: () => bind2,
903
+ bindTo: () => bindTo2,
854
904
  composeK: () => composeK,
855
905
  contains: () => contains,
856
906
  containsWith: () => containsWith,
@@ -876,7 +926,7 @@ __export(Option_exports, {
876
926
  isNone: () => isNone2,
877
927
  isOption: () => isOption2,
878
928
  isSome: () => isSome2,
879
- let: () => let_,
929
+ let: () => let_2,
880
930
  lift2: () => lift2,
881
931
  liftNullable: () => liftNullable,
882
932
  liftPredicate: () => liftPredicate,
@@ -901,10 +951,10 @@ __export(Option_exports, {
901
951
  zipWith: () => zipWith
902
952
  });
903
953
 
904
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Order.js
954
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Order.js
905
955
  var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
906
956
 
907
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Option.js
957
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Option.js
908
958
  var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Option");
909
959
  var none2 = () => none;
910
960
  var some2 = some;
@@ -1034,15 +1084,9 @@ var containsWith = (isEquivalent) => dual(2, (self, a) => isNone2(self) ? false
1034
1084
  var _equivalence = /* @__PURE__ */ equivalence();
1035
1085
  var contains = /* @__PURE__ */ containsWith(_equivalence);
1036
1086
  var exists = /* @__PURE__ */ dual(2, (self, refinement) => isNone2(self) ? false : refinement(self.value));
1037
- var bindTo = /* @__PURE__ */ dual(2, (self, name2) => map(self, (a) => ({
1038
- [name2]: a
1039
- })));
1040
- var let_ = /* @__PURE__ */ dual(3, (self, name2, f) => map(self, (a) => Object.assign({}, a, {
1041
- [name2]: f(a)
1042
- })));
1043
- var bind = /* @__PURE__ */ dual(3, (self, name2, f) => flatMap(self, (a) => map(f(a), (b2) => Object.assign({}, a, {
1044
- [name2]: b2
1045
- }))));
1087
+ var bindTo2 = /* @__PURE__ */ bindTo(map);
1088
+ var let_2 = /* @__PURE__ */ let_(map);
1089
+ var bind2 = /* @__PURE__ */ bind(map, flatMap);
1046
1090
  var Do = /* @__PURE__ */ some2({});
1047
1091
  var adapter2 = /* @__PURE__ */ adapter();
1048
1092
  var gen = (f) => {
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.11-beta.3";
16
+ var version = "1.5.11-beta.8";
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
  defaultOptions: []
55
55
  });
56
56
 
57
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Function.js
57
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Function.js
58
58
  var Function_exports = {};
59
59
  __export(Function_exports, {
60
60
  SK: () => SK,
@@ -229,14 +229,25 @@ function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
229
229
  var hole = /* @__PURE__ */ unsafeCoerce(absurd);
230
230
  var SK = (_2, b2) => b2;
231
231
 
232
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Equivalence.js
232
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Equivalence.js
233
233
  var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
234
234
 
235
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/internal/version.js
236
- var moduleVersion = "3.0.7";
235
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/internal/doNotation.js
236
+ var let_ = (map2) => dual(3, (self, name2, f) => map2(self, (a) => Object.assign({}, a, {
237
+ [name2]: f(a)
238
+ })));
239
+ var bindTo = (map2) => dual(2, (self, name2) => map2(self, (a) => ({
240
+ [name2]: a
241
+ })));
242
+ var bind = (map2, flatMap2) => dual(3, (self, name2, f) => flatMap2(self, (a) => map2(f(a), (b2) => Object.assign({}, a, {
243
+ [name2]: b2
244
+ }))));
245
+
246
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/internal/version.js
247
+ var moduleVersion = "3.1.2";
237
248
  var getCurrentVersion = () => moduleVersion;
238
249
 
239
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/GlobalValue.js
250
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/GlobalValue.js
240
251
  var globalStoreId = /* @__PURE__ */ Symbol.for(`effect/GlobalValue/globalStoreId/${/* @__PURE__ */ getCurrentVersion()}`);
241
252
  if (!(globalStoreId in globalThis)) {
242
253
  globalThis[globalStoreId] = /* @__PURE__ */ new Map();
@@ -249,17 +260,17 @@ var globalValue = (id, compute) => {
249
260
  return globalStore.get(id);
250
261
  };
251
262
 
252
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Predicate.js
263
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Predicate.js
253
264
  var isFunction2 = isFunction;
254
265
  var isRecordOrArray = (input) => typeof input === "object" && input !== null;
255
266
  var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
256
267
  var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
257
268
  var isNullable = (input) => input === null || input === void 0;
258
269
 
259
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/internal/errors.js
270
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/internal/errors.js
260
271
  var getBugErrorMessage = (message) => `BUG: ${message} - please report an issue at https://github.com/Effect-TS/effect/issues`;
261
272
 
262
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Utils.js
273
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Utils.js
263
274
  var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
264
275
  var isGenKind = (u2) => isObject(u2) && GenKindTypeId in u2;
265
276
  var GenKindImpl = class {
@@ -498,8 +509,12 @@ function yieldWrapGet(self) {
498
509
  }
499
510
  throw new Error(getBugErrorMessage("yieldWrapGet"));
500
511
  }
512
+ var structuralRegionState = /* @__PURE__ */ globalValue("effect/Utils/isStructuralRegion", () => ({
513
+ enabled: false,
514
+ tester: void 0
515
+ }));
501
516
 
502
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Hash.js
517
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Hash.js
503
518
  var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
504
519
  var pcgr = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/pcgr"), () => new PCGRandom());
505
520
  var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
@@ -533,6 +548,9 @@ var hash = (self) => {
533
548
  }
534
549
  };
535
550
  var random = (self) => {
551
+ if (structuralRegionState.enabled === true) {
552
+ return 0;
553
+ }
536
554
  if (!randomHashCache.has(self)) {
537
555
  randomHashCache.set(self, number(pcgr.integer(Number.MAX_SAFE_INTEGER)));
538
556
  }
@@ -565,27 +583,39 @@ var cached = function() {
565
583
  if (arguments.length === 1) {
566
584
  const self2 = arguments[0];
567
585
  return function(hash3) {
568
- Object.defineProperty(self2, symbol, {
569
- value() {
570
- return hash3;
571
- },
572
- enumerable: false
573
- });
586
+ const original2 = self2[symbol].bind(self2);
587
+ if (structuralRegionState.enabled === false) {
588
+ Object.defineProperty(self2, symbol, {
589
+ value() {
590
+ if (structuralRegionState.enabled === true) {
591
+ return original2();
592
+ }
593
+ return hash3;
594
+ },
595
+ enumerable: false
596
+ });
597
+ }
574
598
  return hash3;
575
599
  };
576
600
  }
577
601
  const self = arguments[0];
578
602
  const hash2 = arguments[1];
579
- Object.defineProperty(self, symbol, {
580
- value() {
581
- return hash2;
582
- },
583
- enumerable: false
584
- });
603
+ const original = self[symbol].bind(self);
604
+ if (structuralRegionState.enabled === false) {
605
+ Object.defineProperty(self, symbol, {
606
+ value() {
607
+ if (structuralRegionState.enabled === true) {
608
+ return original();
609
+ }
610
+ return hash2;
611
+ },
612
+ enumerable: false
613
+ });
614
+ }
585
615
  return hash2;
586
616
  };
587
617
 
588
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Equal.js
618
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Equal.js
589
619
  var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
590
620
  function equals() {
591
621
  if (arguments.length === 1) {
@@ -601,17 +631,37 @@ function compareBoth(self, that) {
601
631
  if (selfType !== typeof that) {
602
632
  return false;
603
633
  }
604
- if ((selfType === "object" || selfType === "function") && self !== null && that !== null) {
605
- if (isEqual(self) && isEqual(that)) {
606
- return hash(self) === hash(that) && self[symbol2](that);
634
+ if (selfType === "object" || selfType === "function") {
635
+ if (self !== null && that !== null) {
636
+ if (isEqual(self) && isEqual(that)) {
637
+ return hash(self) === hash(that) && self[symbol2](that);
638
+ }
639
+ }
640
+ if (structuralRegionState.enabled) {
641
+ if (Array.isArray(self) && Array.isArray(that)) {
642
+ return self.length === that.length && self.every((v2, i2) => compareBoth(v2, that[i2]));
643
+ }
644
+ if (Object.getPrototypeOf(self) === Object.prototype && Object.getPrototypeOf(self) === Object.prototype) {
645
+ const keysSelf = Object.keys(self);
646
+ const keysThat = Object.keys(that);
647
+ if (keysSelf.length === keysThat.length) {
648
+ for (const key of keysSelf) {
649
+ if (!(key in that && compareBoth(self[key], that[key]))) {
650
+ return structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
651
+ }
652
+ }
653
+ return true;
654
+ }
655
+ }
656
+ return structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
607
657
  }
608
658
  }
609
- return false;
659
+ return structuralRegionState.enabled && structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
610
660
  }
611
661
  var isEqual = (u2) => hasProperty(u2, symbol2);
612
662
  var equivalence = () => equals;
613
663
 
614
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Inspectable.js
664
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Inspectable.js
615
665
  var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
616
666
  var toJSON = (x2) => {
617
667
  if (hasProperty(x2, "toJSON") && isFunction2(x2["toJSON"]) && x2["toJSON"].length === 0) {
@@ -623,7 +673,7 @@ var toJSON = (x2) => {
623
673
  };
624
674
  var format = (x2) => JSON.stringify(x2, null, 2);
625
675
 
626
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Pipeable.js
676
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Pipeable.js
627
677
  var pipeArguments = (self, args) => {
628
678
  switch (args.length) {
629
679
  case 1:
@@ -654,7 +704,7 @@ var pipeArguments = (self, args) => {
654
704
  }
655
705
  };
656
706
 
657
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/internal/effectable.js
707
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/internal/effectable.js
658
708
  var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
659
709
  var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
660
710
  var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
@@ -715,7 +765,7 @@ var EffectPrototype = {
715
765
  }
716
766
  };
717
767
 
718
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/internal/option.js
768
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/internal/option.js
719
769
  var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
720
770
  var CommonProto = {
721
771
  ...EffectPrototype,
@@ -773,7 +823,7 @@ var some = (value) => {
773
823
  return a;
774
824
  };
775
825
 
776
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/internal/either.js
826
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/internal/either.js
777
827
  var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
778
828
  var CommonProto2 = {
779
829
  ...EffectPrototype,
@@ -837,7 +887,7 @@ var right = (right2) => {
837
887
  var getLeft = (self) => isRight(self) ? none : some(self.left);
838
888
  var getRight = (self) => isLeft(self) ? none : some(self.right);
839
889
 
840
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Option.js
890
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Option.js
841
891
  var Option_exports = {};
842
892
  __export(Option_exports, {
843
893
  Do: () => Do,
@@ -847,8 +897,8 @@ __export(Option_exports, {
847
897
  ap: () => ap,
848
898
  as: () => as,
849
899
  asVoid: () => asVoid,
850
- bind: () => bind,
851
- bindTo: () => bindTo,
900
+ bind: () => bind2,
901
+ bindTo: () => bindTo2,
852
902
  composeK: () => composeK,
853
903
  contains: () => contains,
854
904
  containsWith: () => containsWith,
@@ -874,7 +924,7 @@ __export(Option_exports, {
874
924
  isNone: () => isNone2,
875
925
  isOption: () => isOption2,
876
926
  isSome: () => isSome2,
877
- let: () => let_,
927
+ let: () => let_2,
878
928
  lift2: () => lift2,
879
929
  liftNullable: () => liftNullable,
880
930
  liftPredicate: () => liftPredicate,
@@ -899,10 +949,10 @@ __export(Option_exports, {
899
949
  zipWith: () => zipWith
900
950
  });
901
951
 
902
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Order.js
952
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Order.js
903
953
  var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
904
954
 
905
- // ../../../node_modules/.pnpm/effect@3.0.7/node_modules/effect/dist/esm/Option.js
955
+ // ../../../node_modules/.pnpm/effect@3.1.2/node_modules/effect/dist/esm/Option.js
906
956
  var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Option");
907
957
  var none2 = () => none;
908
958
  var some2 = some;
@@ -1032,15 +1082,9 @@ var containsWith = (isEquivalent) => dual(2, (self, a) => isNone2(self) ? false
1032
1082
  var _equivalence = /* @__PURE__ */ equivalence();
1033
1083
  var contains = /* @__PURE__ */ containsWith(_equivalence);
1034
1084
  var exists = /* @__PURE__ */ dual(2, (self, refinement) => isNone2(self) ? false : refinement(self.value));
1035
- var bindTo = /* @__PURE__ */ dual(2, (self, name2) => map(self, (a) => ({
1036
- [name2]: a
1037
- })));
1038
- var let_ = /* @__PURE__ */ dual(3, (self, name2, f) => map(self, (a) => Object.assign({}, a, {
1039
- [name2]: f(a)
1040
- })));
1041
- var bind = /* @__PURE__ */ dual(3, (self, name2, f) => flatMap(self, (a) => map(f(a), (b2) => Object.assign({}, a, {
1042
- [name2]: b2
1043
- }))));
1085
+ var bindTo2 = /* @__PURE__ */ bindTo(map);
1086
+ var let_2 = /* @__PURE__ */ let_(map);
1087
+ var bind2 = /* @__PURE__ */ bind(map, flatMap);
1044
1088
  var Do = /* @__PURE__ */ some2({});
1045
1089
  var adapter2 = /* @__PURE__ */ adapter();
1046
1090
  var gen = (f) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-hooks-extra",
3
- "version": "1.5.11-beta.3",
3
+ "version": "1.5.11-beta.8",
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": {
@@ -41,16 +41,16 @@
41
41
  "@typescript-eslint/types": "^7.8.0",
42
42
  "@typescript-eslint/utils": "^7.8.0",
43
43
  "string-ts": "2.1.1",
44
- "@eslint-react/ast": "1.5.11-beta.3",
45
- "@eslint-react/core": "1.5.11-beta.3",
46
- "@eslint-react/jsx": "1.5.11-beta.3",
47
- "@eslint-react/shared": "1.5.11-beta.3",
48
- "@eslint-react/tools": "1.5.11-beta.3",
49
- "@eslint-react/types": "1.5.11-beta.3",
50
- "@eslint-react/var": "1.5.11-beta.3"
44
+ "@eslint-react/core": "1.5.11-beta.8",
45
+ "@eslint-react/shared": "1.5.11-beta.8",
46
+ "@eslint-react/tools": "1.5.11-beta.8",
47
+ "@eslint-react/types": "1.5.11-beta.8",
48
+ "@eslint-react/var": "1.5.11-beta.8",
49
+ "@eslint-react/jsx": "1.5.11-beta.8",
50
+ "@eslint-react/ast": "1.5.11-beta.8"
51
51
  },
52
52
  "devDependencies": {
53
- "effect": "3.0.7"
53
+ "effect": "3.1.2"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@typescript-eslint/parser": "^7.5.0",