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

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