eslint-plugin-react-hooks-extra 1.5.4-beta.0 → 1.5.4-beta.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.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.4-beta.0";
18
+ var version = "1.5.4-beta.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.3.1/node_modules/effect/dist/esm/Function.js
59
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Function.js
60
60
  var Function_exports = {};
61
61
  __export(Function_exports, {
62
62
  SK: () => SK,
@@ -229,10 +229,10 @@ function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
229
229
  var hole = /* @__PURE__ */ unsafeCoerce(absurd);
230
230
  var SK = (_, b2) => b2;
231
231
 
232
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/internal/version.js
233
- var moduleVersion = "2.3.1";
232
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/internal/version.js
233
+ var moduleVersion = "2.3.3";
234
234
 
235
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/GlobalValue.js
235
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/GlobalValue.js
236
236
  var globalStoreId = /* @__PURE__ */ Symbol.for(`effect/GlobalValue/globalStoreId/${moduleVersion}`);
237
237
  if (!(globalStoreId in globalThis)) {
238
238
  globalThis[globalStoreId] = /* @__PURE__ */ new Map();
@@ -245,14 +245,14 @@ var globalValue = (id, compute) => {
245
245
  return globalStore.get(id);
246
246
  };
247
247
 
248
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Predicate.js
248
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Predicate.js
249
249
  var isFunction2 = isFunction;
250
250
  var isRecordOrArray = (input) => typeof input === "object" && input !== null;
251
251
  var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
252
252
  var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
253
253
  var isNullable = (input) => input === null || input === void 0;
254
254
 
255
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Utils.js
255
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Utils.js
256
256
  var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
257
257
  var GenKindImpl = class {
258
258
  value;
@@ -472,7 +472,7 @@ function add64(out, aHi, aLo, bHi, bLo) {
472
472
  out[1] = lo;
473
473
  }
474
474
 
475
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Hash.js
475
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Hash.js
476
476
  var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
477
477
  var pcgr = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/pcgr"), () => new PCGRandom());
478
478
  var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
@@ -535,7 +535,7 @@ var string = (str) => {
535
535
  return optimize(h);
536
536
  };
537
537
 
538
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Equal.js
538
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Equal.js
539
539
  var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
540
540
  function equals() {
541
541
  if (arguments.length === 1) {
@@ -561,10 +561,10 @@ function compareBoth(self, that) {
561
561
  var isEqual = (u2) => hasProperty(u2, symbol2);
562
562
  var equivalence = () => (self, that) => equals(self, that);
563
563
 
564
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Equivalence.js
564
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Equivalence.js
565
565
  var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
566
566
 
567
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Inspectable.js
567
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Inspectable.js
568
568
  var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
569
569
  var toJSON = (x2) => {
570
570
  if (hasProperty(x2, "toJSON") && isFunction2(x2["toJSON"]) && x2["toJSON"].length === 0) {
@@ -576,7 +576,7 @@ var toJSON = (x2) => {
576
576
  };
577
577
  var format = (x2) => JSON.stringify(x2, null, 2);
578
578
 
579
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Option.js
579
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Option.js
580
580
  var Option_exports = {};
581
581
  __export(Option_exports, {
582
582
  Do: () => Do,
@@ -638,7 +638,7 @@ __export(Option_exports, {
638
638
  zipWith: () => zipWith
639
639
  });
640
640
 
641
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Pipeable.js
641
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Pipeable.js
642
642
  var pipeArguments = (self, args) => {
643
643
  switch (args.length) {
644
644
  case 1:
@@ -669,7 +669,7 @@ var pipeArguments = (self, args) => {
669
669
  }
670
670
  };
671
671
 
672
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/internal/effectable.js
672
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/internal/effectable.js
673
673
  var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
674
674
  var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
675
675
  var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
@@ -727,7 +727,7 @@ var EffectPrototype = {
727
727
  }
728
728
  };
729
729
 
730
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/internal/option.js
730
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/internal/option.js
731
731
  var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
732
732
  var CommonProto = {
733
733
  ...EffectPrototype,
@@ -784,7 +784,7 @@ var some = (value) => {
784
784
  return a;
785
785
  };
786
786
 
787
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/internal/either.js
787
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/internal/either.js
788
788
  var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
789
789
  var CommonProto2 = {
790
790
  ...EffectPrototype,
@@ -848,10 +848,10 @@ var right = (right2) => {
848
848
  var getLeft = (self) => isRight(self) ? none : some(self.left);
849
849
  var getRight = (self) => isLeft(self) ? none : some(self.right);
850
850
 
851
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Order.js
851
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Order.js
852
852
  var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
853
853
 
854
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Option.js
854
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Option.js
855
855
  var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Option");
856
856
  var none2 = () => none;
857
857
  var some2 = some;
@@ -907,7 +907,10 @@ var as = /* @__PURE__ */ dual(2, (self, b2) => map(self, () => b2));
907
907
  var asUnit = /* @__PURE__ */ as(void 0);
908
908
  var unit = /* @__PURE__ */ some2(void 0);
909
909
  var flatMap = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : f(self.value));
910
- var andThen = /* @__PURE__ */ dual(2, (self, f) => isFunction(f) ? flatMap(self, f) : flatMap(self, () => f));
910
+ var andThen = /* @__PURE__ */ dual(2, (self, f) => flatMap(self, (a) => {
911
+ const b2 = isFunction(f) ? f(a) : f;
912
+ return isOption2(b2) ? b2 : some2(b2);
913
+ }));
911
914
  var flatMapNullable = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : fromNullable(f(self.value)));
912
915
  var flatten = /* @__PURE__ */ flatMap(identity);
913
916
  var zipRight = /* @__PURE__ */ dual(2, (self, that) => flatMap(self, () => that));
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.4-beta.0";
16
+ var version = "1.5.4-beta.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.3.1/node_modules/effect/dist/esm/Function.js
57
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Function.js
58
58
  var Function_exports = {};
59
59
  __export(Function_exports, {
60
60
  SK: () => SK,
@@ -227,10 +227,10 @@ function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
227
227
  var hole = /* @__PURE__ */ unsafeCoerce(absurd);
228
228
  var SK = (_, b2) => b2;
229
229
 
230
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/internal/version.js
231
- var moduleVersion = "2.3.1";
230
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/internal/version.js
231
+ var moduleVersion = "2.3.3";
232
232
 
233
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/GlobalValue.js
233
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/GlobalValue.js
234
234
  var globalStoreId = /* @__PURE__ */ Symbol.for(`effect/GlobalValue/globalStoreId/${moduleVersion}`);
235
235
  if (!(globalStoreId in globalThis)) {
236
236
  globalThis[globalStoreId] = /* @__PURE__ */ new Map();
@@ -243,14 +243,14 @@ var globalValue = (id, compute) => {
243
243
  return globalStore.get(id);
244
244
  };
245
245
 
246
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Predicate.js
246
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Predicate.js
247
247
  var isFunction2 = isFunction;
248
248
  var isRecordOrArray = (input) => typeof input === "object" && input !== null;
249
249
  var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
250
250
  var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
251
251
  var isNullable = (input) => input === null || input === void 0;
252
252
 
253
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Utils.js
253
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Utils.js
254
254
  var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
255
255
  var GenKindImpl = class {
256
256
  value;
@@ -470,7 +470,7 @@ function add64(out, aHi, aLo, bHi, bLo) {
470
470
  out[1] = lo;
471
471
  }
472
472
 
473
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Hash.js
473
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Hash.js
474
474
  var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
475
475
  var pcgr = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/pcgr"), () => new PCGRandom());
476
476
  var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
@@ -533,7 +533,7 @@ var string = (str) => {
533
533
  return optimize(h);
534
534
  };
535
535
 
536
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Equal.js
536
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Equal.js
537
537
  var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
538
538
  function equals() {
539
539
  if (arguments.length === 1) {
@@ -559,10 +559,10 @@ function compareBoth(self, that) {
559
559
  var isEqual = (u2) => hasProperty(u2, symbol2);
560
560
  var equivalence = () => (self, that) => equals(self, that);
561
561
 
562
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Equivalence.js
562
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Equivalence.js
563
563
  var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
564
564
 
565
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Inspectable.js
565
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Inspectable.js
566
566
  var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
567
567
  var toJSON = (x2) => {
568
568
  if (hasProperty(x2, "toJSON") && isFunction2(x2["toJSON"]) && x2["toJSON"].length === 0) {
@@ -574,7 +574,7 @@ var toJSON = (x2) => {
574
574
  };
575
575
  var format = (x2) => JSON.stringify(x2, null, 2);
576
576
 
577
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Option.js
577
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Option.js
578
578
  var Option_exports = {};
579
579
  __export(Option_exports, {
580
580
  Do: () => Do,
@@ -636,7 +636,7 @@ __export(Option_exports, {
636
636
  zipWith: () => zipWith
637
637
  });
638
638
 
639
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Pipeable.js
639
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Pipeable.js
640
640
  var pipeArguments = (self, args) => {
641
641
  switch (args.length) {
642
642
  case 1:
@@ -667,7 +667,7 @@ var pipeArguments = (self, args) => {
667
667
  }
668
668
  };
669
669
 
670
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/internal/effectable.js
670
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/internal/effectable.js
671
671
  var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
672
672
  var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
673
673
  var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
@@ -725,7 +725,7 @@ var EffectPrototype = {
725
725
  }
726
726
  };
727
727
 
728
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/internal/option.js
728
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/internal/option.js
729
729
  var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
730
730
  var CommonProto = {
731
731
  ...EffectPrototype,
@@ -782,7 +782,7 @@ var some = (value) => {
782
782
  return a;
783
783
  };
784
784
 
785
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/internal/either.js
785
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/internal/either.js
786
786
  var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
787
787
  var CommonProto2 = {
788
788
  ...EffectPrototype,
@@ -846,10 +846,10 @@ var right = (right2) => {
846
846
  var getLeft = (self) => isRight(self) ? none : some(self.left);
847
847
  var getRight = (self) => isLeft(self) ? none : some(self.right);
848
848
 
849
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Order.js
849
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Order.js
850
850
  var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
851
851
 
852
- // ../../../node_modules/.pnpm/effect@2.3.1/node_modules/effect/dist/esm/Option.js
852
+ // ../../../node_modules/.pnpm/effect@2.3.3/node_modules/effect/dist/esm/Option.js
853
853
  var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Option");
854
854
  var none2 = () => none;
855
855
  var some2 = some;
@@ -905,7 +905,10 @@ var as = /* @__PURE__ */ dual(2, (self, b2) => map(self, () => b2));
905
905
  var asUnit = /* @__PURE__ */ as(void 0);
906
906
  var unit = /* @__PURE__ */ some2(void 0);
907
907
  var flatMap = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : f(self.value));
908
- var andThen = /* @__PURE__ */ dual(2, (self, f) => isFunction(f) ? flatMap(self, f) : flatMap(self, () => f));
908
+ var andThen = /* @__PURE__ */ dual(2, (self, f) => flatMap(self, (a) => {
909
+ const b2 = isFunction(f) ? f(a) : f;
910
+ return isOption2(b2) ? b2 : some2(b2);
911
+ }));
909
912
  var flatMapNullable = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : fromNullable(f(self.value)));
910
913
  var flatten = /* @__PURE__ */ flatMap(identity);
911
914
  var zipRight = /* @__PURE__ */ dual(2, (self, that) => flatMap(self, () => that));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-hooks-extra",
3
- "version": "1.5.4-beta.0",
3
+ "version": "1.5.4-beta.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": {
@@ -41,16 +41,16 @@
41
41
  "@typescript-eslint/types": ">=6.21.0",
42
42
  "@typescript-eslint/utils": ">=6.21.0",
43
43
  "string-ts": "2.0.0",
44
- "@eslint-react/ast": "1.5.4-beta.0",
45
- "@eslint-react/core": "1.5.4-beta.0",
46
- "@eslint-react/jsx": "1.5.4-beta.0",
47
- "@eslint-react/shared": "1.5.4-beta.0",
48
- "@eslint-react/tools": "1.5.4-beta.0",
49
- "@eslint-react/types": "1.5.4-beta.0",
50
- "@eslint-react/var": "1.5.4-beta.0"
44
+ "@eslint-react/ast": "1.5.4-beta.1",
45
+ "@eslint-react/core": "1.5.4-beta.1",
46
+ "@eslint-react/jsx": "1.5.4-beta.1",
47
+ "@eslint-react/tools": "1.5.4-beta.1",
48
+ "@eslint-react/shared": "1.5.4-beta.1",
49
+ "@eslint-react/types": "1.5.4-beta.1",
50
+ "@eslint-react/var": "1.5.4-beta.1"
51
51
  },
52
52
  "devDependencies": {
53
- "effect": "2.3.1"
53
+ "effect": "2.3.3"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "eslint": ">=8.56.0",