eslint-plugin-react-hooks-extra 1.5.16 → 1.5.17-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +23 -1095
  2. package/dist/index.mjs +23 -1095
  3. package/package.json +15 -15
package/dist/index.js CHANGED
@@ -4,17 +4,12 @@ var core = require('@eslint-react/core');
4
4
  var shared = require('@eslint-react/shared');
5
5
  var ast = require('@eslint-react/ast');
6
6
  var _var = require('@eslint-react/var');
7
+ var effect = require('effect');
7
8
  var valibot = require('valibot');
8
9
 
9
- var __defProp = Object.defineProperty;
10
- var __export = (target, all2) => {
11
- for (var name2 in all2)
12
- __defProp(target, name2, { get: all2[name2], enumerable: true });
13
- };
14
-
15
10
  // package.json
16
11
  var name = "eslint-plugin-react-hooks-extra";
17
- var version = "1.5.16";
12
+ var version = "1.5.17-beta.2";
18
13
  var createRule = shared.createRuleForPlugin("hooks-extra");
19
14
 
20
15
  // src/rules/ensure-custom-hooks-using-other-hooks.ts
@@ -54,1073 +49,6 @@ var ensure_custom_hooks_using_other_hooks_default = createRule({
54
49
  defaultOptions: []
55
50
  });
56
51
 
57
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/Function.js
58
- var Function_exports = {};
59
- __export(Function_exports, {
60
- SK: () => SK,
61
- absurd: () => absurd,
62
- apply: () => apply,
63
- compose: () => compose,
64
- constFalse: () => constFalse,
65
- constNull: () => constNull,
66
- constTrue: () => constTrue,
67
- constUndefined: () => constUndefined,
68
- constVoid: () => constVoid,
69
- constant: () => constant,
70
- dual: () => dual,
71
- flip: () => flip,
72
- flow: () => flow,
73
- hole: () => hole,
74
- identity: () => identity,
75
- isFunction: () => isFunction,
76
- pipe: () => pipe,
77
- satisfies: () => satisfies,
78
- tupled: () => tupled,
79
- unsafeCoerce: () => unsafeCoerce,
80
- untupled: () => untupled
81
- });
82
- var isFunction = (input) => typeof input === "function";
83
- var dual = function(arity, body) {
84
- if (typeof arity === "function") {
85
- return function() {
86
- if (arity(arguments)) {
87
- return body.apply(this, arguments);
88
- }
89
- return (self) => body(self, ...arguments);
90
- };
91
- }
92
- switch (arity) {
93
- case 0:
94
- case 1:
95
- throw new RangeError(`Invalid arity ${arity}`);
96
- case 2:
97
- return function(a, b2) {
98
- if (arguments.length >= 2) {
99
- return body(a, b2);
100
- }
101
- return function(self) {
102
- return body(self, a);
103
- };
104
- };
105
- case 3:
106
- return function(a, b2, c2) {
107
- if (arguments.length >= 3) {
108
- return body(a, b2, c2);
109
- }
110
- return function(self) {
111
- return body(self, a, b2);
112
- };
113
- };
114
- case 4:
115
- return function(a, b2, c2, d2) {
116
- if (arguments.length >= 4) {
117
- return body(a, b2, c2, d2);
118
- }
119
- return function(self) {
120
- return body(self, a, b2, c2);
121
- };
122
- };
123
- case 5:
124
- return function(a, b2, c2, d2, e2) {
125
- if (arguments.length >= 5) {
126
- return body(a, b2, c2, d2, e2);
127
- }
128
- return function(self) {
129
- return body(self, a, b2, c2, d2);
130
- };
131
- };
132
- default:
133
- return function() {
134
- if (arguments.length >= arity) {
135
- return body.apply(this, arguments);
136
- }
137
- const args = arguments;
138
- return function(self) {
139
- return body(self, ...args);
140
- };
141
- };
142
- }
143
- };
144
- var apply = (a) => (self) => self(a);
145
- var identity = (a) => a;
146
- var satisfies = () => (b2) => b2;
147
- var unsafeCoerce = identity;
148
- var constant = (value) => () => value;
149
- var constTrue = /* @__PURE__ */ constant(true);
150
- var constFalse = /* @__PURE__ */ constant(false);
151
- var constNull = /* @__PURE__ */ constant(null);
152
- var constUndefined = /* @__PURE__ */ constant(void 0);
153
- var constVoid = constUndefined;
154
- var flip = (f) => (...b2) => (...a) => f(...a)(...b2);
155
- var compose = /* @__PURE__ */ dual(2, (ab, bc) => (a) => bc(ab(a)));
156
- var absurd = (_2) => {
157
- throw new Error("Called `absurd` function which should be uncallable");
158
- };
159
- var tupled = (f) => (a) => f(...a);
160
- var untupled = (f) => (...a) => f(a);
161
- function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
162
- switch (arguments.length) {
163
- case 1:
164
- return a;
165
- case 2:
166
- return ab(a);
167
- case 3:
168
- return bc(ab(a));
169
- case 4:
170
- return cd(bc(ab(a)));
171
- case 5:
172
- return de(cd(bc(ab(a))));
173
- case 6:
174
- return ef(de(cd(bc(ab(a)))));
175
- case 7:
176
- return fg(ef(de(cd(bc(ab(a))))));
177
- case 8:
178
- return gh(fg(ef(de(cd(bc(ab(a)))))));
179
- case 9:
180
- return hi(gh(fg(ef(de(cd(bc(ab(a))))))));
181
- default: {
182
- let ret = arguments[0];
183
- for (let i2 = 1; i2 < arguments.length; i2++) {
184
- ret = arguments[i2](ret);
185
- }
186
- return ret;
187
- }
188
- }
189
- }
190
- function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
191
- switch (arguments.length) {
192
- case 1:
193
- return ab;
194
- case 2:
195
- return function() {
196
- return bc(ab.apply(this, arguments));
197
- };
198
- case 3:
199
- return function() {
200
- return cd(bc(ab.apply(this, arguments)));
201
- };
202
- case 4:
203
- return function() {
204
- return de(cd(bc(ab.apply(this, arguments))));
205
- };
206
- case 5:
207
- return function() {
208
- return ef(de(cd(bc(ab.apply(this, arguments)))));
209
- };
210
- case 6:
211
- return function() {
212
- return fg(ef(de(cd(bc(ab.apply(this, arguments))))));
213
- };
214
- case 7:
215
- return function() {
216
- return gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))));
217
- };
218
- case 8:
219
- return function() {
220
- return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))));
221
- };
222
- case 9:
223
- return function() {
224
- return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))));
225
- };
226
- }
227
- return;
228
- }
229
- var hole = /* @__PURE__ */ unsafeCoerce(absurd);
230
- var SK = (_2, b2) => b2;
231
-
232
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/Equivalence.js
233
- var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
234
-
235
- // ../../../node_modules/.pnpm/effect@3.3.3/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.3.3/node_modules/effect/dist/esm/internal/version.js
247
- var moduleVersion = "3.3.3";
248
- var getCurrentVersion = () => moduleVersion;
249
-
250
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/GlobalValue.js
251
- var globalStoreId = /* @__PURE__ */ Symbol.for(`effect/GlobalValue/globalStoreId/${/* @__PURE__ */ getCurrentVersion()}`);
252
- if (!(globalStoreId in globalThis)) {
253
- globalThis[globalStoreId] = /* @__PURE__ */ new Map();
254
- }
255
- var globalStore = globalThis[globalStoreId];
256
- var globalValue = (id, compute) => {
257
- if (!globalStore.has(id)) {
258
- globalStore.set(id, compute());
259
- }
260
- return globalStore.get(id);
261
- };
262
-
263
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/Predicate.js
264
- var isFunction2 = isFunction;
265
- var isRecordOrArray = (input) => typeof input === "object" && input !== null;
266
- var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
267
- var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
268
- var isNullable = (input) => input === null || input === void 0;
269
-
270
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/internal/errors.js
271
- var getBugErrorMessage = (message) => `BUG: ${message} - please report an issue at https://github.com/Effect-TS/effect/issues`;
272
-
273
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/Utils.js
274
- var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
275
- var isGenKind = (u2) => isObject(u2) && GenKindTypeId in u2;
276
- var GenKindImpl = class {
277
- value;
278
- constructor(value) {
279
- this.value = value;
280
- }
281
- /**
282
- * @since 2.0.0
283
- */
284
- get _F() {
285
- return identity;
286
- }
287
- /**
288
- * @since 2.0.0
289
- */
290
- get _R() {
291
- return (_2) => _2;
292
- }
293
- /**
294
- * @since 2.0.0
295
- */
296
- get _O() {
297
- return (_2) => _2;
298
- }
299
- /**
300
- * @since 2.0.0
301
- */
302
- get _E() {
303
- return (_2) => _2;
304
- }
305
- /**
306
- * @since 2.0.0
307
- */
308
- [GenKindTypeId] = GenKindTypeId;
309
- /**
310
- * @since 2.0.0
311
- */
312
- [Symbol.iterator]() {
313
- return new SingleShotGen(this);
314
- }
315
- };
316
- var SingleShotGen = class _SingleShotGen {
317
- self;
318
- called = false;
319
- constructor(self) {
320
- this.self = self;
321
- }
322
- /**
323
- * @since 2.0.0
324
- */
325
- next(a) {
326
- return this.called ? {
327
- value: a,
328
- done: true
329
- } : (this.called = true, {
330
- value: this.self,
331
- done: false
332
- });
333
- }
334
- /**
335
- * @since 2.0.0
336
- */
337
- return(a) {
338
- return {
339
- value: a,
340
- done: true
341
- };
342
- }
343
- /**
344
- * @since 2.0.0
345
- */
346
- throw(e2) {
347
- throw e2;
348
- }
349
- /**
350
- * @since 2.0.0
351
- */
352
- [Symbol.iterator]() {
353
- return new _SingleShotGen(this.self);
354
- }
355
- };
356
- var adapter = () => function() {
357
- let x2 = arguments[0];
358
- for (let i2 = 1; i2 < arguments.length; i2++) {
359
- x2 = arguments[i2](x2);
360
- }
361
- return new GenKindImpl(x2);
362
- };
363
- var defaultIncHi = 335903614;
364
- var defaultIncLo = 4150755663;
365
- var MUL_HI = 1481765933 >>> 0;
366
- var MUL_LO = 1284865837 >>> 0;
367
- var BIT_53 = 9007199254740992;
368
- var BIT_27 = 134217728;
369
- var PCGRandom = class {
370
- _state;
371
- constructor(seedHi, seedLo, incHi, incLo) {
372
- if (isNullable(seedLo) && isNullable(seedHi)) {
373
- seedLo = Math.random() * 4294967295 >>> 0;
374
- seedHi = 0;
375
- } else if (isNullable(seedLo)) {
376
- seedLo = seedHi;
377
- seedHi = 0;
378
- }
379
- if (isNullable(incLo) && isNullable(incHi)) {
380
- incLo = this._state ? this._state[3] : defaultIncLo;
381
- incHi = this._state ? this._state[2] : defaultIncHi;
382
- } else if (isNullable(incLo)) {
383
- incLo = incHi;
384
- incHi = 0;
385
- }
386
- this._state = new Int32Array([0, 0, incHi >>> 0, ((incLo || 0) | 1) >>> 0]);
387
- this._next();
388
- add64(this._state, this._state[0], this._state[1], seedHi >>> 0, seedLo >>> 0);
389
- this._next();
390
- return this;
391
- }
392
- /**
393
- * Returns a copy of the internal state of this random number generator as a
394
- * JavaScript Array.
395
- *
396
- * @category getters
397
- * @since 2.0.0
398
- */
399
- getState() {
400
- return [this._state[0], this._state[1], this._state[2], this._state[3]];
401
- }
402
- /**
403
- * Restore state previously retrieved using `getState()`.
404
- *
405
- * @since 2.0.0
406
- */
407
- setState(state) {
408
- this._state[0] = state[0];
409
- this._state[1] = state[1];
410
- this._state[2] = state[2];
411
- this._state[3] = state[3] | 1;
412
- }
413
- /**
414
- * Get a uniformly distributed 32 bit integer between [0, max).
415
- *
416
- * @category getter
417
- * @since 2.0.0
418
- */
419
- integer(max) {
420
- if (!max) {
421
- return this._next();
422
- }
423
- max = max >>> 0;
424
- if ((max & max - 1) === 0) {
425
- return this._next() & max - 1;
426
- }
427
- let num = 0;
428
- const skew = (-max >>> 0) % max >>> 0;
429
- for (num = this._next(); num < skew; num = this._next()) {
430
- }
431
- return num % max;
432
- }
433
- /**
434
- * Get a uniformly distributed IEEE-754 double between 0.0 and 1.0, with
435
- * 53 bits of precision (every bit of the mantissa is randomized).
436
- *
437
- * @category getters
438
- * @since 2.0.0
439
- */
440
- number() {
441
- const hi = (this._next() & 67108863) * 1;
442
- const lo = (this._next() & 134217727) * 1;
443
- return (hi * BIT_27 + lo) / BIT_53;
444
- }
445
- /** @internal */
446
- _next() {
447
- const oldHi = this._state[0] >>> 0;
448
- const oldLo = this._state[1] >>> 0;
449
- mul64(this._state, oldHi, oldLo, MUL_HI, MUL_LO);
450
- add64(this._state, this._state[0], this._state[1], this._state[2], this._state[3]);
451
- let xsHi = oldHi >>> 18;
452
- let xsLo = (oldLo >>> 18 | oldHi << 14) >>> 0;
453
- xsHi = (xsHi ^ oldHi) >>> 0;
454
- xsLo = (xsLo ^ oldLo) >>> 0;
455
- const xorshifted = (xsLo >>> 27 | xsHi << 5) >>> 0;
456
- const rot = oldHi >>> 27;
457
- const rot2 = (-rot >>> 0 & 31) >>> 0;
458
- return (xorshifted >>> rot | xorshifted << rot2) >>> 0;
459
- }
460
- };
461
- function mul64(out, aHi, aLo, bHi, bLo) {
462
- let c1 = (aLo >>> 16) * (bLo & 65535) >>> 0;
463
- let c0 = (aLo & 65535) * (bLo >>> 16) >>> 0;
464
- let lo = (aLo & 65535) * (bLo & 65535) >>> 0;
465
- let hi = (aLo >>> 16) * (bLo >>> 16) + ((c0 >>> 16) + (c1 >>> 16)) >>> 0;
466
- c0 = c0 << 16 >>> 0;
467
- lo = lo + c0 >>> 0;
468
- if (lo >>> 0 < c0 >>> 0) {
469
- hi = hi + 1 >>> 0;
470
- }
471
- c1 = c1 << 16 >>> 0;
472
- lo = lo + c1 >>> 0;
473
- if (lo >>> 0 < c1 >>> 0) {
474
- hi = hi + 1 >>> 0;
475
- }
476
- hi = hi + Math.imul(aLo, bHi) >>> 0;
477
- hi = hi + Math.imul(aHi, bLo) >>> 0;
478
- out[0] = hi;
479
- out[1] = lo;
480
- }
481
- function add64(out, aHi, aLo, bHi, bLo) {
482
- let hi = aHi + bHi >>> 0;
483
- const lo = aLo + bLo >>> 0;
484
- if (lo >>> 0 < aLo >>> 0) {
485
- hi = hi + 1 | 0;
486
- }
487
- out[0] = hi;
488
- out[1] = lo;
489
- }
490
- var YieldWrapTypeId = /* @__PURE__ */ Symbol.for("effect/Utils/YieldWrap");
491
- var YieldWrap = class {
492
- /**
493
- * @since 3.0.6
494
- */
495
- #value;
496
- constructor(value) {
497
- this.#value = value;
498
- }
499
- /**
500
- * @since 3.0.6
501
- */
502
- [YieldWrapTypeId]() {
503
- return this.#value;
504
- }
505
- };
506
- function yieldWrapGet(self) {
507
- if (typeof self === "object" && self !== null && YieldWrapTypeId in self) {
508
- return self[YieldWrapTypeId]();
509
- }
510
- throw new Error(getBugErrorMessage("yieldWrapGet"));
511
- }
512
- var structuralRegionState = /* @__PURE__ */ globalValue("effect/Utils/isStructuralRegion", () => ({
513
- enabled: false,
514
- tester: void 0
515
- }));
516
-
517
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/Hash.js
518
- var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
519
- var pcgr = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/pcgr"), () => new PCGRandom());
520
- var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
521
- var hash = (self) => {
522
- if (structuralRegionState.enabled === true) {
523
- return 0;
524
- }
525
- switch (typeof self) {
526
- case "number":
527
- return number(self);
528
- case "bigint":
529
- return string(self.toString(10));
530
- case "boolean":
531
- return string(String(self));
532
- case "symbol":
533
- return string(String(self));
534
- case "string":
535
- return string(self);
536
- case "undefined":
537
- return string("undefined");
538
- case "function":
539
- case "object": {
540
- if (self === null) {
541
- return string("null");
542
- } else if (self instanceof Date) {
543
- return hash(self.toISOString());
544
- } else if (isHash(self)) {
545
- return self[symbol]();
546
- } else {
547
- return random(self);
548
- }
549
- }
550
- default:
551
- throw new Error(`BUG: unhandled typeof ${typeof self} - please report an issue at https://github.com/Effect-TS/effect/issues`);
552
- }
553
- };
554
- var random = (self) => {
555
- if (!randomHashCache.has(self)) {
556
- randomHashCache.set(self, number(pcgr.integer(Number.MAX_SAFE_INTEGER)));
557
- }
558
- return randomHashCache.get(self);
559
- };
560
- var combine = (b2) => (self) => self * 53 ^ b2;
561
- var optimize = (n2) => n2 & 3221225471 | n2 >>> 1 & 1073741824;
562
- var isHash = (u2) => hasProperty(u2, symbol);
563
- var number = (n2) => {
564
- if (n2 !== n2 || n2 === Infinity) {
565
- return 0;
566
- }
567
- let h = n2 | 0;
568
- if (h !== n2) {
569
- h ^= n2 * 4294967295;
570
- }
571
- while (n2 > 4294967295) {
572
- h ^= n2 /= 4294967295;
573
- }
574
- return optimize(n2);
575
- };
576
- var string = (str) => {
577
- let h = 5381, i2 = str.length;
578
- while (i2) {
579
- h = h * 33 ^ str.charCodeAt(--i2);
580
- }
581
- return optimize(h);
582
- };
583
- var cached = function() {
584
- if (arguments.length === 1) {
585
- const self2 = arguments[0];
586
- return function(hash3) {
587
- Object.defineProperty(self2, symbol, {
588
- value() {
589
- return hash3;
590
- },
591
- enumerable: false
592
- });
593
- return hash3;
594
- };
595
- }
596
- const self = arguments[0];
597
- const hash2 = arguments[1];
598
- Object.defineProperty(self, symbol, {
599
- value() {
600
- return hash2;
601
- },
602
- enumerable: false
603
- });
604
- return hash2;
605
- };
606
-
607
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/Equal.js
608
- var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
609
- function equals() {
610
- if (arguments.length === 1) {
611
- return (self) => compareBoth(self, arguments[0]);
612
- }
613
- return compareBoth(arguments[0], arguments[1]);
614
- }
615
- function compareBoth(self, that) {
616
- if (self === that) {
617
- return true;
618
- }
619
- const selfType = typeof self;
620
- if (selfType !== typeof that) {
621
- return false;
622
- }
623
- if (selfType === "object" || selfType === "function") {
624
- if (self !== null && that !== null) {
625
- if (isEqual(self) && isEqual(that)) {
626
- if (hash(self) === hash(that) && self[symbol2](that)) {
627
- return true;
628
- } else {
629
- return structuralRegionState.enabled && structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
630
- }
631
- } else if (self instanceof Date && that instanceof Date) {
632
- return self.toISOString() === that.toISOString();
633
- }
634
- }
635
- if (structuralRegionState.enabled) {
636
- if (Array.isArray(self) && Array.isArray(that)) {
637
- return self.length === that.length && self.every((v2, i2) => compareBoth(v2, that[i2]));
638
- }
639
- if (Object.getPrototypeOf(self) === Object.prototype && Object.getPrototypeOf(self) === Object.prototype) {
640
- const keysSelf = Object.keys(self);
641
- const keysThat = Object.keys(that);
642
- if (keysSelf.length === keysThat.length) {
643
- for (const key of keysSelf) {
644
- if (!(key in that && compareBoth(self[key], that[key]))) {
645
- return structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
646
- }
647
- }
648
- return true;
649
- }
650
- }
651
- return structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
652
- }
653
- }
654
- return structuralRegionState.enabled && structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
655
- }
656
- var isEqual = (u2) => hasProperty(u2, symbol2);
657
- var equivalence = () => equals;
658
-
659
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/Inspectable.js
660
- var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
661
- var toJSON = (x2) => {
662
- if (hasProperty(x2, "toJSON") && isFunction2(x2["toJSON"]) && x2["toJSON"].length === 0) {
663
- return x2.toJSON();
664
- } else if (Array.isArray(x2)) {
665
- return x2.map(toJSON);
666
- }
667
- return x2;
668
- };
669
- var format = (x2) => JSON.stringify(x2, null, 2);
670
-
671
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/Pipeable.js
672
- var pipeArguments = (self, args) => {
673
- switch (args.length) {
674
- case 1:
675
- return args[0](self);
676
- case 2:
677
- return args[1](args[0](self));
678
- case 3:
679
- return args[2](args[1](args[0](self)));
680
- case 4:
681
- return args[3](args[2](args[1](args[0](self))));
682
- case 5:
683
- return args[4](args[3](args[2](args[1](args[0](self)))));
684
- case 6:
685
- return args[5](args[4](args[3](args[2](args[1](args[0](self))))));
686
- case 7:
687
- return args[6](args[5](args[4](args[3](args[2](args[1](args[0](self)))))));
688
- case 8:
689
- return args[7](args[6](args[5](args[4](args[3](args[2](args[1](args[0](self))))))));
690
- case 9:
691
- return args[8](args[7](args[6](args[5](args[4](args[3](args[2](args[1](args[0](self)))))))));
692
- default: {
693
- let ret = self;
694
- for (let i2 = 0, len = args.length; i2 < len; i2++) {
695
- ret = args[i2](ret);
696
- }
697
- return ret;
698
- }
699
- }
700
- };
701
-
702
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/internal/effectable.js
703
- var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
704
- var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
705
- var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
706
- var ChannelTypeId = /* @__PURE__ */ Symbol.for("effect/Channel");
707
- var effectVariance = {
708
- /* c8 ignore next */
709
- _R: (_2) => _2,
710
- /* c8 ignore next */
711
- _E: (_2) => _2,
712
- /* c8 ignore next */
713
- _A: (_2) => _2,
714
- _V: /* @__PURE__ */ getCurrentVersion()
715
- };
716
- var sinkVariance = {
717
- /* c8 ignore next */
718
- _A: (_2) => _2,
719
- /* c8 ignore next */
720
- _In: (_2) => _2,
721
- /* c8 ignore next */
722
- _L: (_2) => _2,
723
- /* c8 ignore next */
724
- _E: (_2) => _2,
725
- /* c8 ignore next */
726
- _R: (_2) => _2
727
- };
728
- var channelVariance = {
729
- /* c8 ignore next */
730
- _Env: (_2) => _2,
731
- /* c8 ignore next */
732
- _InErr: (_2) => _2,
733
- /* c8 ignore next */
734
- _InElem: (_2) => _2,
735
- /* c8 ignore next */
736
- _InDone: (_2) => _2,
737
- /* c8 ignore next */
738
- _OutErr: (_2) => _2,
739
- /* c8 ignore next */
740
- _OutElem: (_2) => _2,
741
- /* c8 ignore next */
742
- _OutDone: (_2) => _2
743
- };
744
- var EffectPrototype = {
745
- [EffectTypeId]: effectVariance,
746
- [StreamTypeId]: effectVariance,
747
- [SinkTypeId]: sinkVariance,
748
- [ChannelTypeId]: channelVariance,
749
- [symbol2](that) {
750
- return this === that;
751
- },
752
- [symbol]() {
753
- return cached(this, random(this));
754
- },
755
- [Symbol.iterator]() {
756
- return new SingleShotGen(new YieldWrap(this));
757
- },
758
- pipe() {
759
- return pipeArguments(this, arguments);
760
- }
761
- };
762
-
763
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/internal/option.js
764
- var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
765
- var CommonProto = {
766
- ...EffectPrototype,
767
- [TypeId]: {
768
- _A: (_2) => _2
769
- },
770
- [NodeInspectSymbol]() {
771
- return this.toJSON();
772
- },
773
- toString() {
774
- return format(this.toJSON());
775
- }
776
- };
777
- var SomeProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(CommonProto), {
778
- _tag: "Some",
779
- _op: "Some",
780
- [symbol2](that) {
781
- return isOption(that) && isSome(that) && equals(this.value, that.value);
782
- },
783
- [symbol]() {
784
- return cached(this, combine(hash(this._tag))(hash(this.value)));
785
- },
786
- toJSON() {
787
- return {
788
- _id: "Option",
789
- _tag: this._tag,
790
- value: toJSON(this.value)
791
- };
792
- }
793
- });
794
- var NoneHash = /* @__PURE__ */ hash("None");
795
- var NoneProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(CommonProto), {
796
- _tag: "None",
797
- _op: "None",
798
- [symbol2](that) {
799
- return isOption(that) && isNone(that);
800
- },
801
- [symbol]() {
802
- return NoneHash;
803
- },
804
- toJSON() {
805
- return {
806
- _id: "Option",
807
- _tag: this._tag
808
- };
809
- }
810
- });
811
- var isOption = (input) => hasProperty(input, TypeId);
812
- var isNone = (fa) => fa._tag === "None";
813
- var isSome = (fa) => fa._tag === "Some";
814
- var none = /* @__PURE__ */ Object.create(NoneProto);
815
- var some = (value) => {
816
- const a = Object.create(SomeProto);
817
- a.value = value;
818
- return a;
819
- };
820
-
821
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/internal/either.js
822
- var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
823
- var CommonProto2 = {
824
- ...EffectPrototype,
825
- [TypeId2]: {
826
- _R: (_2) => _2
827
- },
828
- [NodeInspectSymbol]() {
829
- return this.toJSON();
830
- },
831
- toString() {
832
- return format(this.toJSON());
833
- }
834
- };
835
- var RightProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(CommonProto2), {
836
- _tag: "Right",
837
- _op: "Right",
838
- [symbol2](that) {
839
- return isEither(that) && isRight(that) && equals(this.right, that.right);
840
- },
841
- [symbol]() {
842
- return combine(hash(this._tag))(hash(this.right));
843
- },
844
- toJSON() {
845
- return {
846
- _id: "Either",
847
- _tag: this._tag,
848
- right: toJSON(this.right)
849
- };
850
- }
851
- });
852
- var LeftProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(CommonProto2), {
853
- _tag: "Left",
854
- _op: "Left",
855
- [symbol2](that) {
856
- return isEither(that) && isLeft(that) && equals(this.left, that.left);
857
- },
858
- [symbol]() {
859
- return combine(hash(this._tag))(hash(this.left));
860
- },
861
- toJSON() {
862
- return {
863
- _id: "Either",
864
- _tag: this._tag,
865
- left: toJSON(this.left)
866
- };
867
- }
868
- });
869
- var isEither = (input) => hasProperty(input, TypeId2);
870
- var isLeft = (ma) => ma._tag === "Left";
871
- var isRight = (ma) => ma._tag === "Right";
872
- var left = (left2) => {
873
- const a = Object.create(LeftProto);
874
- a.left = left2;
875
- return a;
876
- };
877
- var right = (right2) => {
878
- const a = Object.create(RightProto);
879
- a.right = right2;
880
- return a;
881
- };
882
- var getLeft = (self) => isRight(self) ? none : some(self.left);
883
- var getRight = (self) => isLeft(self) ? none : some(self.right);
884
-
885
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/Option.js
886
- var Option_exports = {};
887
- __export(Option_exports, {
888
- Do: () => Do,
889
- TypeId: () => TypeId3,
890
- all: () => all,
891
- andThen: () => andThen,
892
- ap: () => ap,
893
- as: () => as,
894
- asVoid: () => asVoid,
895
- bind: () => bind2,
896
- bindTo: () => bindTo2,
897
- composeK: () => composeK,
898
- contains: () => contains,
899
- containsWith: () => containsWith,
900
- exists: () => exists,
901
- filter: () => filter,
902
- filterMap: () => filterMap,
903
- firstSomeOf: () => firstSomeOf,
904
- flatMap: () => flatMap,
905
- flatMapNullable: () => flatMapNullable,
906
- flatten: () => flatten,
907
- fromIterable: () => fromIterable,
908
- fromNullable: () => fromNullable,
909
- gen: () => gen,
910
- getEquivalence: () => getEquivalence,
911
- getLeft: () => getLeft2,
912
- getOrElse: () => getOrElse,
913
- getOrNull: () => getOrNull,
914
- getOrThrow: () => getOrThrow,
915
- getOrThrowWith: () => getOrThrowWith,
916
- getOrUndefined: () => getOrUndefined,
917
- getOrder: () => getOrder,
918
- getRight: () => getRight2,
919
- isNone: () => isNone2,
920
- isOption: () => isOption2,
921
- isSome: () => isSome2,
922
- let: () => let_2,
923
- lift2: () => lift2,
924
- liftNullable: () => liftNullable,
925
- liftPredicate: () => liftPredicate,
926
- liftThrowable: () => liftThrowable,
927
- map: () => map,
928
- match: () => match,
929
- none: () => none2,
930
- orElse: () => orElse,
931
- orElseEither: () => orElseEither,
932
- orElseSome: () => orElseSome,
933
- partitionMap: () => partitionMap,
934
- product: () => product,
935
- productMany: () => productMany,
936
- reduceCompact: () => reduceCompact,
937
- some: () => some2,
938
- tap: () => tap,
939
- toArray: () => toArray,
940
- toRefinement: () => toRefinement,
941
- void: () => void_,
942
- zipLeft: () => zipLeft,
943
- zipRight: () => zipRight,
944
- zipWith: () => zipWith
945
- });
946
-
947
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/Order.js
948
- var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
949
-
950
- // ../../../node_modules/.pnpm/effect@3.3.3/node_modules/effect/dist/esm/Option.js
951
- var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Option");
952
- var none2 = () => none;
953
- var some2 = some;
954
- var isOption2 = isOption;
955
- var isNone2 = isNone;
956
- var isSome2 = isSome;
957
- var match = /* @__PURE__ */ dual(2, (self, {
958
- onNone,
959
- onSome
960
- }) => isNone2(self) ? onNone() : onSome(self.value));
961
- var toRefinement = (f) => (a) => isSome2(f(a));
962
- var fromIterable = (collection) => {
963
- for (const a of collection) {
964
- return some2(a);
965
- }
966
- return none2();
967
- };
968
- var getRight2 = getRight;
969
- var getLeft2 = getLeft;
970
- var getOrElse = /* @__PURE__ */ dual(2, (self, onNone) => isNone2(self) ? onNone() : self.value);
971
- var orElse = /* @__PURE__ */ dual(2, (self, that) => isNone2(self) ? that() : self);
972
- var orElseSome = /* @__PURE__ */ dual(2, (self, onNone) => isNone2(self) ? some2(onNone()) : self);
973
- var orElseEither = /* @__PURE__ */ dual(2, (self, that) => isNone2(self) ? map(that(), right) : map(self, left));
974
- var firstSomeOf = (collection) => {
975
- let out = none2();
976
- for (out of collection) {
977
- if (isSome2(out)) {
978
- return out;
979
- }
980
- }
981
- return out;
982
- };
983
- var fromNullable = (nullableValue) => nullableValue == null ? none2() : some2(nullableValue);
984
- var liftNullable = (f) => (...a) => fromNullable(f(...a));
985
- var getOrNull = /* @__PURE__ */ getOrElse(constNull);
986
- var getOrUndefined = /* @__PURE__ */ getOrElse(constUndefined);
987
- var liftThrowable = (f) => (...a) => {
988
- try {
989
- return some2(f(...a));
990
- } catch (e2) {
991
- return none2();
992
- }
993
- };
994
- var getOrThrowWith = /* @__PURE__ */ dual(2, (self, onNone) => {
995
- if (isSome2(self)) {
996
- return self.value;
997
- }
998
- throw onNone();
999
- });
1000
- var getOrThrow = /* @__PURE__ */ getOrThrowWith(() => new Error("getOrThrow called on a None"));
1001
- var map = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : some2(f(self.value)));
1002
- var as = /* @__PURE__ */ dual(2, (self, b2) => map(self, () => b2));
1003
- var asVoid = /* @__PURE__ */ as(void 0);
1004
- var void_ = /* @__PURE__ */ some2(void 0);
1005
- var flatMap = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : f(self.value));
1006
- var andThen = /* @__PURE__ */ dual(2, (self, f) => flatMap(self, (a) => {
1007
- const b2 = isFunction(f) ? f(a) : f;
1008
- return isOption2(b2) ? b2 : some2(b2);
1009
- }));
1010
- var flatMapNullable = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : fromNullable(f(self.value)));
1011
- var flatten = /* @__PURE__ */ flatMap(identity);
1012
- var zipRight = /* @__PURE__ */ dual(2, (self, that) => flatMap(self, () => that));
1013
- var composeK = /* @__PURE__ */ dual(2, (afb, bfc) => (a) => flatMap(afb(a), bfc));
1014
- var zipLeft = /* @__PURE__ */ dual(2, (self, that) => tap(self, () => that));
1015
- var tap = /* @__PURE__ */ dual(2, (self, f) => flatMap(self, (a) => map(f(a), () => a)));
1016
- var product = (self, that) => isSome2(self) && isSome2(that) ? some2([self.value, that.value]) : none2();
1017
- var productMany = (self, collection) => {
1018
- if (isNone2(self)) {
1019
- return none2();
1020
- }
1021
- const out = [self.value];
1022
- for (const o2 of collection) {
1023
- if (isNone2(o2)) {
1024
- return none2();
1025
- }
1026
- out.push(o2.value);
1027
- }
1028
- return some2(out);
1029
- };
1030
- var all = (input) => {
1031
- if (Symbol.iterator in input) {
1032
- const out2 = [];
1033
- for (const o2 of input) {
1034
- if (isNone2(o2)) {
1035
- return none2();
1036
- }
1037
- out2.push(o2.value);
1038
- }
1039
- return some2(out2);
1040
- }
1041
- const out = {};
1042
- for (const key of Object.keys(input)) {
1043
- const o2 = input[key];
1044
- if (isNone2(o2)) {
1045
- return none2();
1046
- }
1047
- out[key] = o2.value;
1048
- }
1049
- return some2(out);
1050
- };
1051
- var zipWith = /* @__PURE__ */ dual(3, (self, that, f) => map(product(self, that), ([a, b2]) => f(a, b2)));
1052
- var ap = /* @__PURE__ */ dual(2, (self, that) => zipWith(self, that, (f, a) => f(a)));
1053
- var reduceCompact = /* @__PURE__ */ dual(3, (self, b2, f) => {
1054
- let out = b2;
1055
- for (const oa of self) {
1056
- if (isSome2(oa)) {
1057
- out = f(out, oa.value);
1058
- }
1059
- }
1060
- return out;
1061
- });
1062
- var toArray = (self) => isNone2(self) ? [] : [self.value];
1063
- var partitionMap = /* @__PURE__ */ dual(2, (self, f) => {
1064
- if (isNone2(self)) {
1065
- return [none2(), none2()];
1066
- }
1067
- const e2 = f(self.value);
1068
- return isLeft(e2) ? [some2(e2.left), none2()] : [none2(), some2(e2.right)];
1069
- });
1070
- var filterMap = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : f(self.value));
1071
- var filter = /* @__PURE__ */ dual(2, (self, predicate) => filterMap(self, (b2) => predicate(b2) ? some(b2) : none));
1072
- var getEquivalence = (isEquivalent) => make((x2, y2) => isNone2(x2) ? isNone2(y2) : isNone2(y2) ? false : isEquivalent(x2.value, y2.value));
1073
- var getOrder = (O) => make2((self, that) => isSome2(self) ? isSome2(that) ? O(self.value, that.value) : 1 : -1);
1074
- var lift2 = (f) => dual(2, (self, that) => zipWith(self, that, f));
1075
- var liftPredicate = (predicate) => (b2) => predicate(b2) ? some2(b2) : none2();
1076
- var containsWith = (isEquivalent) => dual(2, (self, a) => isNone2(self) ? false : isEquivalent(self.value, a));
1077
- var _equivalence = /* @__PURE__ */ equivalence();
1078
- var contains = /* @__PURE__ */ containsWith(_equivalence);
1079
- var exists = /* @__PURE__ */ dual(2, (self, refinement) => isNone2(self) ? false : refinement(self.value));
1080
- var bindTo2 = /* @__PURE__ */ bindTo(map);
1081
- var let_2 = /* @__PURE__ */ let_(map);
1082
- var bind2 = /* @__PURE__ */ bind(map, flatMap);
1083
- var Do = /* @__PURE__ */ some2({});
1084
- var adapter2 = /* @__PURE__ */ adapter();
1085
- var gen = (...args) => {
1086
- let f;
1087
- if (args.length === 1) {
1088
- f = args[0];
1089
- } else {
1090
- f = args[1].bind(args[0]);
1091
- }
1092
- const iterator = f(adapter2);
1093
- let state = iterator.next();
1094
- if (state.done) {
1095
- return some2(state.value);
1096
- } else {
1097
- let current = state.value;
1098
- if (isGenKind(current)) {
1099
- current = current.value;
1100
- } else {
1101
- current = yieldWrapGet(current);
1102
- }
1103
- if (isNone2(current)) {
1104
- return current;
1105
- }
1106
- while (!state.done) {
1107
- state = iterator.next(current.value);
1108
- if (!state.done) {
1109
- current = state.value;
1110
- if (isGenKind(current)) {
1111
- current = current.value;
1112
- } else {
1113
- current = yieldWrapGet(current);
1114
- }
1115
- if (isNone2(current)) {
1116
- return current;
1117
- }
1118
- }
1119
- }
1120
- return some2(state.value);
1121
- }
1122
- };
1123
-
1124
52
  // ../../../node_modules/.pnpm/ts-pattern@5.2.0/node_modules/ts-pattern/dist/index.js
1125
53
  var t = Symbol.for("@ts-pattern/matcher");
1126
54
  var e = Symbol.for("@ts-pattern/isVariadic");
@@ -1310,7 +238,7 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
1310
238
  CallExpression(node) {
1311
239
  const initialScope = context.sourceCode.getScope(node);
1312
240
  if (!core.isReactHookCall(node)) return;
1313
- if (!core.isUseCallbackCall(node, context) && !alias.some(Function_exports.flip(core.isReactHookCallWithNameLoose)(node))) {
241
+ if (!core.isUseCallbackCall(node, context) && !alias.some(effect.Function.flip(core.isReactHookCallWithNameLoose)(node))) {
1314
242
  return;
1315
243
  }
1316
244
  const [_2, deps] = node.arguments;
@@ -1321,21 +249,21 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
1321
249
  });
1322
250
  return;
1323
251
  }
1324
- const maybeDescriptor = Function_exports.pipe(
1325
- $(deps).with({ type: ast.NodeType.ArrayExpression }, Option_exports.some).with({ type: ast.NodeType.Identifier }, (n2) => {
1326
- return Function_exports.pipe(
252
+ const maybeDescriptor = effect.Function.pipe(
253
+ $(deps).with({ type: ast.NodeType.ArrayExpression }, effect.Option.some).with({ type: ast.NodeType.Identifier }, (n2) => {
254
+ return effect.Function.pipe(
1327
255
  _var.findVariable(n2.name, initialScope),
1328
- Option_exports.flatMap(_var.getVariableInit(0)),
1329
- Option_exports.filter(ast.is(ast.NodeType.ArrayExpression))
256
+ effect.Option.flatMap(_var.getVariableInit(0)),
257
+ effect.Option.filter(ast.is(ast.NodeType.ArrayExpression))
1330
258
  );
1331
- }).otherwise(Option_exports.none),
1332
- Option_exports.filter((x2) => x2.elements.length === 0),
1333
- Option_exports.map(() => ({
259
+ }).otherwise(effect.Option.none),
260
+ effect.Option.filter((x2) => x2.elements.length === 0),
261
+ effect.Option.map(() => ({
1334
262
  messageId: "ENSURE_USE_CALLBACK_HAS_NON_EMPTY_DEPS",
1335
263
  node
1336
264
  }))
1337
265
  );
1338
- Option_exports.map(maybeDescriptor, context.report);
266
+ effect.Option.map(maybeDescriptor, context.report);
1339
267
  }
1340
268
  };
1341
269
  },
@@ -1361,7 +289,7 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
1361
289
  CallExpression(node) {
1362
290
  const initialScope = context.sourceCode.getScope(node);
1363
291
  if (!core.isReactHookCall(node)) return;
1364
- if (!core.isUseMemoCall(node, context) && !alias.some(Function_exports.flip(core.isReactHookCallWithNameLoose)(node))) return;
292
+ if (!core.isUseMemoCall(node, context) && !alias.some(effect.Function.flip(core.isReactHookCallWithNameLoose)(node))) return;
1365
293
  const [_2, deps] = node.arguments;
1366
294
  if (!deps) {
1367
295
  context.report({
@@ -1370,21 +298,21 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
1370
298
  });
1371
299
  return;
1372
300
  }
1373
- const maybeDescriptor = Function_exports.pipe(
1374
- $(deps).with({ type: ast.NodeType.ArrayExpression }, Option_exports.some).with({ type: ast.NodeType.Identifier }, (n2) => {
1375
- return Function_exports.pipe(
301
+ const maybeDescriptor = effect.Function.pipe(
302
+ $(deps).with({ type: ast.NodeType.ArrayExpression }, effect.Option.some).with({ type: ast.NodeType.Identifier }, (n2) => {
303
+ return effect.Function.pipe(
1376
304
  _var.findVariable(n2.name, initialScope),
1377
- Option_exports.flatMap(_var.getVariableInit(0)),
1378
- Option_exports.filter(ast.is(ast.NodeType.ArrayExpression))
305
+ effect.Option.flatMap(_var.getVariableInit(0)),
306
+ effect.Option.filter(ast.is(ast.NodeType.ArrayExpression))
1379
307
  );
1380
- }).otherwise(Option_exports.none),
1381
- Option_exports.filter((x2) => x2.elements.length === 0),
1382
- Option_exports.map(() => ({
308
+ }).otherwise(effect.Option.none),
309
+ effect.Option.filter((x2) => x2.elements.length === 0),
310
+ effect.Option.map(() => ({
1383
311
  messageId: "ENSURE_USE_MEMO_HAS_NON_EMPTY_DEPS",
1384
312
  node
1385
313
  }))
1386
314
  );
1387
- Option_exports.map(maybeDescriptor, context.report);
315
+ effect.Option.map(maybeDescriptor, context.report);
1388
316
  }
1389
317
  };
1390
318
  },
@@ -1410,7 +338,7 @@ var prefer_use_state_lazy_initialization_default = createRule({
1410
338
  return {
1411
339
  CallExpression(node) {
1412
340
  if (!core.isReactHookCall(node)) return;
1413
- if (!core.isUseStateCall(node, context) && !alias.some(Function_exports.flip(core.isReactHookCallWithNameLoose)(node))) return;
341
+ if (!core.isUseStateCall(node, context) && !alias.some(effect.Function.flip(core.isReactHookCallWithNameLoose)(node))) return;
1414
342
  const [useStateInput] = node.arguments;
1415
343
  if (!useStateInput) return;
1416
344
  const nestedCallExpressions = ast.getNestedCallExpressions(useStateInput);