eslint-plugin-react-hooks-extra 1.5.4-beta.1 → 1.5.4-beta.6
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 +40 -38
- package/dist/index.mjs +40 -38
- package/package.json +14 -14
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.
|
|
18
|
+
var version = "1.5.4-beta.6";
|
|
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.
|
|
59
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Function.js
|
|
60
60
|
var Function_exports = {};
|
|
61
61
|
__export(Function_exports, {
|
|
62
62
|
SK: () => SK,
|
|
@@ -76,6 +76,7 @@ __export(Function_exports, {
|
|
|
76
76
|
identity: () => identity,
|
|
77
77
|
isFunction: () => isFunction,
|
|
78
78
|
pipe: () => pipe,
|
|
79
|
+
satisfies: () => satisfies,
|
|
79
80
|
tupled: () => tupled,
|
|
80
81
|
unsafeCoerce: () => unsafeCoerce,
|
|
81
82
|
untupled: () => untupled
|
|
@@ -144,6 +145,7 @@ var dual = function(arity, body) {
|
|
|
144
145
|
};
|
|
145
146
|
var apply = (a) => (self) => self(a);
|
|
146
147
|
var identity = (a) => a;
|
|
148
|
+
var satisfies = () => (b2) => b2;
|
|
147
149
|
var unsafeCoerce = identity;
|
|
148
150
|
var constant = (value) => () => value;
|
|
149
151
|
var constTrue = /* @__PURE__ */ constant(true);
|
|
@@ -229,10 +231,10 @@ function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
|
|
|
229
231
|
var hole = /* @__PURE__ */ unsafeCoerce(absurd);
|
|
230
232
|
var SK = (_, b2) => b2;
|
|
231
233
|
|
|
232
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
233
|
-
var moduleVersion = "2.3.
|
|
234
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/internal/version.js
|
|
235
|
+
var moduleVersion = "2.3.6";
|
|
234
236
|
|
|
235
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
237
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/GlobalValue.js
|
|
236
238
|
var globalStoreId = /* @__PURE__ */ Symbol.for(`effect/GlobalValue/globalStoreId/${moduleVersion}`);
|
|
237
239
|
if (!(globalStoreId in globalThis)) {
|
|
238
240
|
globalThis[globalStoreId] = /* @__PURE__ */ new Map();
|
|
@@ -245,14 +247,14 @@ var globalValue = (id, compute) => {
|
|
|
245
247
|
return globalStore.get(id);
|
|
246
248
|
};
|
|
247
249
|
|
|
248
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
250
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Predicate.js
|
|
249
251
|
var isFunction2 = isFunction;
|
|
250
252
|
var isRecordOrArray = (input) => typeof input === "object" && input !== null;
|
|
251
253
|
var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
|
|
252
254
|
var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
|
|
253
255
|
var isNullable = (input) => input === null || input === void 0;
|
|
254
256
|
|
|
255
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
257
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Utils.js
|
|
256
258
|
var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
|
|
257
259
|
var GenKindImpl = class {
|
|
258
260
|
value;
|
|
@@ -472,7 +474,7 @@ function add64(out, aHi, aLo, bHi, bLo) {
|
|
|
472
474
|
out[1] = lo;
|
|
473
475
|
}
|
|
474
476
|
|
|
475
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
477
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Hash.js
|
|
476
478
|
var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
|
|
477
479
|
var pcgr = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/pcgr"), () => new PCGRandom());
|
|
478
480
|
var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
|
|
@@ -535,7 +537,7 @@ var string = (str) => {
|
|
|
535
537
|
return optimize(h);
|
|
536
538
|
};
|
|
537
539
|
|
|
538
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
540
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Equal.js
|
|
539
541
|
var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
|
|
540
542
|
function equals() {
|
|
541
543
|
if (arguments.length === 1) {
|
|
@@ -561,10 +563,10 @@ function compareBoth(self, that) {
|
|
|
561
563
|
var isEqual = (u2) => hasProperty(u2, symbol2);
|
|
562
564
|
var equivalence = () => (self, that) => equals(self, that);
|
|
563
565
|
|
|
564
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
566
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Equivalence.js
|
|
565
567
|
var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
566
568
|
|
|
567
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
569
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Inspectable.js
|
|
568
570
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
569
571
|
var toJSON = (x2) => {
|
|
570
572
|
if (hasProperty(x2, "toJSON") && isFunction2(x2["toJSON"]) && x2["toJSON"].length === 0) {
|
|
@@ -576,7 +578,7 @@ var toJSON = (x2) => {
|
|
|
576
578
|
};
|
|
577
579
|
var format = (x2) => JSON.stringify(x2, null, 2);
|
|
578
580
|
|
|
579
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
581
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Option.js
|
|
580
582
|
var Option_exports = {};
|
|
581
583
|
__export(Option_exports, {
|
|
582
584
|
Do: () => Do,
|
|
@@ -638,7 +640,7 @@ __export(Option_exports, {
|
|
|
638
640
|
zipWith: () => zipWith
|
|
639
641
|
});
|
|
640
642
|
|
|
641
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
643
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Pipeable.js
|
|
642
644
|
var pipeArguments = (self, args) => {
|
|
643
645
|
switch (args.length) {
|
|
644
646
|
case 1:
|
|
@@ -669,7 +671,7 @@ var pipeArguments = (self, args) => {
|
|
|
669
671
|
}
|
|
670
672
|
};
|
|
671
673
|
|
|
672
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
674
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/internal/effectable.js
|
|
673
675
|
var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
|
|
674
676
|
var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
|
|
675
677
|
var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
|
|
@@ -727,7 +729,7 @@ var EffectPrototype = {
|
|
|
727
729
|
}
|
|
728
730
|
};
|
|
729
731
|
|
|
730
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
732
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/internal/option.js
|
|
731
733
|
var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
|
|
732
734
|
var CommonProto = {
|
|
733
735
|
...EffectPrototype,
|
|
@@ -784,7 +786,7 @@ var some = (value) => {
|
|
|
784
786
|
return a;
|
|
785
787
|
};
|
|
786
788
|
|
|
787
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
789
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/internal/either.js
|
|
788
790
|
var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
|
|
789
791
|
var CommonProto2 = {
|
|
790
792
|
...EffectPrototype,
|
|
@@ -848,10 +850,10 @@ var right = (right2) => {
|
|
|
848
850
|
var getLeft = (self) => isRight(self) ? none : some(self.left);
|
|
849
851
|
var getRight = (self) => isLeft(self) ? none : some(self.right);
|
|
850
852
|
|
|
851
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
853
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Order.js
|
|
852
854
|
var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
|
|
853
855
|
|
|
854
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
856
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Option.js
|
|
855
857
|
var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Option");
|
|
856
858
|
var none2 = () => none;
|
|
857
859
|
var some2 = some;
|
|
@@ -1015,7 +1017,7 @@ var gen = (f) => {
|
|
|
1015
1017
|
}
|
|
1016
1018
|
};
|
|
1017
1019
|
|
|
1018
|
-
// ../../../node_modules/.pnpm/ts-pattern@5.0.
|
|
1020
|
+
// ../../../node_modules/.pnpm/ts-pattern@5.0.8/node_modules/ts-pattern/dist/index.js
|
|
1019
1021
|
var t = Symbol.for("@ts-pattern/matcher");
|
|
1020
1022
|
var e = Symbol.for("@ts-pattern/isVariadic");
|
|
1021
1023
|
var n = "@ts-pattern/anonymous-select-key";
|
|
@@ -1061,7 +1063,7 @@ var o = (e2) => {
|
|
|
1061
1063
|
};
|
|
1062
1064
|
var c = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
|
|
1063
1065
|
function u(t2) {
|
|
1064
|
-
return Object.assign(t2, { optional: () => l(t2), and: (e2) => m(t2, e2), or: (e2) =>
|
|
1066
|
+
return Object.assign(t2, { optional: () => l(t2), and: (e2) => m(t2, e2), or: (e2) => d(t2, e2), select: (e2) => void 0 === e2 ? p(t2) : p(e2, t2) });
|
|
1065
1067
|
}
|
|
1066
1068
|
function l(e2) {
|
|
1067
1069
|
return u({ [t]: () => ({ match: (t2) => {
|
|
@@ -1081,7 +1083,7 @@ function m(...e2) {
|
|
|
1081
1083
|
return { matched: e2.every((e3) => s(e3, t2, r2)), selections: n2 };
|
|
1082
1084
|
}, getSelectionKeys: () => c(e2, o), matcherType: "and" }) });
|
|
1083
1085
|
}
|
|
1084
|
-
function
|
|
1086
|
+
function d(...e2) {
|
|
1085
1087
|
return u({ [t]: () => ({ match: (t2) => {
|
|
1086
1088
|
let n2 = {};
|
|
1087
1089
|
const r2 = (t3, e3) => {
|
|
@@ -1090,7 +1092,7 @@ function y(...e2) {
|
|
|
1090
1092
|
return c(e2, o).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => s(e3, t2, r2)), selections: n2 };
|
|
1091
1093
|
}, getSelectionKeys: () => c(e2, o), matcherType: "or" }) });
|
|
1092
1094
|
}
|
|
1093
|
-
function
|
|
1095
|
+
function y(e2) {
|
|
1094
1096
|
return { [t]: () => ({ match: (t2) => ({ matched: Boolean(e2(t2)) }) }) };
|
|
1095
1097
|
}
|
|
1096
1098
|
function p(...e2) {
|
|
@@ -1111,34 +1113,34 @@ function b(t2) {
|
|
|
1111
1113
|
function w(t2) {
|
|
1112
1114
|
return "bigint" == typeof t2;
|
|
1113
1115
|
}
|
|
1114
|
-
u(
|
|
1116
|
+
u(y(function(t2) {
|
|
1115
1117
|
return true;
|
|
1116
1118
|
}));
|
|
1117
1119
|
var j = (t2) => Object.assign(u(t2), { startsWith: (e2) => {
|
|
1118
|
-
return j(m(t2, (n2 = e2,
|
|
1120
|
+
return j(m(t2, (n2 = e2, y((t3) => b(t3) && t3.startsWith(n2)))));
|
|
1119
1121
|
var n2;
|
|
1120
1122
|
}, endsWith: (e2) => {
|
|
1121
|
-
return j(m(t2, (n2 = e2,
|
|
1123
|
+
return j(m(t2, (n2 = e2, y((t3) => b(t3) && t3.endsWith(n2)))));
|
|
1122
1124
|
var n2;
|
|
1123
|
-
}, minLength: (e2) => j(m(t2, ((t3) =>
|
|
1124
|
-
return j(m(t2, (n2 = e2,
|
|
1125
|
+
}, minLength: (e2) => j(m(t2, ((t3) => y((e3) => b(e3) && e3.length >= t3))(e2))), maxLength: (e2) => j(m(t2, ((t3) => y((e3) => b(e3) && e3.length <= t3))(e2))), includes: (e2) => {
|
|
1126
|
+
return j(m(t2, (n2 = e2, y((t3) => b(t3) && t3.includes(n2)))));
|
|
1125
1127
|
var n2;
|
|
1126
1128
|
}, regex: (e2) => {
|
|
1127
|
-
return j(m(t2, (n2 = e2,
|
|
1129
|
+
return j(m(t2, (n2 = e2, y((t3) => b(t3) && Boolean(t3.match(n2))))));
|
|
1128
1130
|
var n2;
|
|
1129
1131
|
} });
|
|
1130
|
-
j(
|
|
1131
|
-
var K = (t2) => Object.assign(u(t2), { between: (e2, n2) => K(m(t2, ((t3, e3) =>
|
|
1132
|
-
K(
|
|
1133
|
-
var
|
|
1134
|
-
|
|
1135
|
-
u(
|
|
1132
|
+
j(y(b));
|
|
1133
|
+
var K = (t2) => Object.assign(u(t2), { between: (e2, n2) => K(m(t2, ((t3, e3) => y((n3) => v(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => K(m(t2, ((t3) => y((e3) => v(e3) && e3 < t3))(e2))), gt: (e2) => K(m(t2, ((t3) => y((e3) => v(e3) && e3 > t3))(e2))), lte: (e2) => K(m(t2, ((t3) => y((e3) => v(e3) && e3 <= t3))(e2))), gte: (e2) => K(m(t2, ((t3) => y((e3) => v(e3) && e3 >= t3))(e2))), int: () => K(m(t2, y((t3) => v(t3) && Number.isInteger(t3)))), finite: () => K(m(t2, y((t3) => v(t3) && Number.isFinite(t3)))), positive: () => K(m(t2, y((t3) => v(t3) && t3 > 0))), negative: () => K(m(t2, y((t3) => v(t3) && t3 < 0))) });
|
|
1134
|
+
K(y(v));
|
|
1135
|
+
var A = (t2) => Object.assign(u(t2), { between: (e2, n2) => A(m(t2, ((t3, e3) => y((n3) => w(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => A(m(t2, ((t3) => y((e3) => w(e3) && e3 < t3))(e2))), gt: (e2) => A(m(t2, ((t3) => y((e3) => w(e3) && e3 > t3))(e2))), lte: (e2) => A(m(t2, ((t3) => y((e3) => w(e3) && e3 <= t3))(e2))), gte: (e2) => A(m(t2, ((t3) => y((e3) => w(e3) && e3 >= t3))(e2))), positive: () => A(m(t2, y((t3) => w(t3) && t3 > 0))), negative: () => A(m(t2, y((t3) => w(t3) && t3 < 0))) });
|
|
1136
|
+
A(y(w));
|
|
1137
|
+
u(y(function(t2) {
|
|
1136
1138
|
return "boolean" == typeof t2;
|
|
1137
1139
|
}));
|
|
1138
|
-
u(
|
|
1140
|
+
u(y(function(t2) {
|
|
1139
1141
|
return "symbol" == typeof t2;
|
|
1140
1142
|
}));
|
|
1141
|
-
u(
|
|
1143
|
+
u(y(function(t2) {
|
|
1142
1144
|
return null == t2;
|
|
1143
1145
|
}));
|
|
1144
1146
|
var W = { matched: false, value: void 0 };
|
|
@@ -1210,7 +1212,7 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
|
|
|
1210
1212
|
const pragma = jsx.getPragmaFromContext(context);
|
|
1211
1213
|
return {
|
|
1212
1214
|
CallExpression(node) {
|
|
1213
|
-
const initialScope = context.sourceCode.getScope
|
|
1215
|
+
const initialScope = context.sourceCode.getScope(node);
|
|
1214
1216
|
if (!core.isReactHookCall(node))
|
|
1215
1217
|
return;
|
|
1216
1218
|
if (!core.isUseCallbackCall(node, context, pragma) && !alias.some(Function_exports.flip(core.isReactHookCallWithNameLoose)(node))) {
|
|
@@ -1263,7 +1265,7 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
|
|
|
1263
1265
|
const pragma = jsx.getPragmaFromContext(context);
|
|
1264
1266
|
return {
|
|
1265
1267
|
CallExpression(node) {
|
|
1266
|
-
const initialScope = context.sourceCode.getScope
|
|
1268
|
+
const initialScope = context.sourceCode.getScope(node);
|
|
1267
1269
|
if (!core.isReactHookCall(node))
|
|
1268
1270
|
return;
|
|
1269
1271
|
if (!core.isUseMemoCall(node, context, pragma) && !alias.some(Function_exports.flip(core.isReactHookCallWithNameLoose)(node)))
|
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.
|
|
16
|
+
var version = "1.5.4-beta.6";
|
|
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.
|
|
57
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Function.js
|
|
58
58
|
var Function_exports = {};
|
|
59
59
|
__export(Function_exports, {
|
|
60
60
|
SK: () => SK,
|
|
@@ -74,6 +74,7 @@ __export(Function_exports, {
|
|
|
74
74
|
identity: () => identity,
|
|
75
75
|
isFunction: () => isFunction,
|
|
76
76
|
pipe: () => pipe,
|
|
77
|
+
satisfies: () => satisfies,
|
|
77
78
|
tupled: () => tupled,
|
|
78
79
|
unsafeCoerce: () => unsafeCoerce,
|
|
79
80
|
untupled: () => untupled
|
|
@@ -142,6 +143,7 @@ var dual = function(arity, body) {
|
|
|
142
143
|
};
|
|
143
144
|
var apply = (a) => (self) => self(a);
|
|
144
145
|
var identity = (a) => a;
|
|
146
|
+
var satisfies = () => (b2) => b2;
|
|
145
147
|
var unsafeCoerce = identity;
|
|
146
148
|
var constant = (value) => () => value;
|
|
147
149
|
var constTrue = /* @__PURE__ */ constant(true);
|
|
@@ -227,10 +229,10 @@ function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
|
|
|
227
229
|
var hole = /* @__PURE__ */ unsafeCoerce(absurd);
|
|
228
230
|
var SK = (_, b2) => b2;
|
|
229
231
|
|
|
230
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
231
|
-
var moduleVersion = "2.3.
|
|
232
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/internal/version.js
|
|
233
|
+
var moduleVersion = "2.3.6";
|
|
232
234
|
|
|
233
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
235
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/GlobalValue.js
|
|
234
236
|
var globalStoreId = /* @__PURE__ */ Symbol.for(`effect/GlobalValue/globalStoreId/${moduleVersion}`);
|
|
235
237
|
if (!(globalStoreId in globalThis)) {
|
|
236
238
|
globalThis[globalStoreId] = /* @__PURE__ */ new Map();
|
|
@@ -243,14 +245,14 @@ var globalValue = (id, compute) => {
|
|
|
243
245
|
return globalStore.get(id);
|
|
244
246
|
};
|
|
245
247
|
|
|
246
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
248
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Predicate.js
|
|
247
249
|
var isFunction2 = isFunction;
|
|
248
250
|
var isRecordOrArray = (input) => typeof input === "object" && input !== null;
|
|
249
251
|
var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
|
|
250
252
|
var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
|
|
251
253
|
var isNullable = (input) => input === null || input === void 0;
|
|
252
254
|
|
|
253
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
255
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Utils.js
|
|
254
256
|
var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
|
|
255
257
|
var GenKindImpl = class {
|
|
256
258
|
value;
|
|
@@ -470,7 +472,7 @@ function add64(out, aHi, aLo, bHi, bLo) {
|
|
|
470
472
|
out[1] = lo;
|
|
471
473
|
}
|
|
472
474
|
|
|
473
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
475
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Hash.js
|
|
474
476
|
var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
|
|
475
477
|
var pcgr = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/pcgr"), () => new PCGRandom());
|
|
476
478
|
var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
|
|
@@ -533,7 +535,7 @@ var string = (str) => {
|
|
|
533
535
|
return optimize(h);
|
|
534
536
|
};
|
|
535
537
|
|
|
536
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
538
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Equal.js
|
|
537
539
|
var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
|
|
538
540
|
function equals() {
|
|
539
541
|
if (arguments.length === 1) {
|
|
@@ -559,10 +561,10 @@ function compareBoth(self, that) {
|
|
|
559
561
|
var isEqual = (u2) => hasProperty(u2, symbol2);
|
|
560
562
|
var equivalence = () => (self, that) => equals(self, that);
|
|
561
563
|
|
|
562
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
564
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Equivalence.js
|
|
563
565
|
var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
564
566
|
|
|
565
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
567
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Inspectable.js
|
|
566
568
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
567
569
|
var toJSON = (x2) => {
|
|
568
570
|
if (hasProperty(x2, "toJSON") && isFunction2(x2["toJSON"]) && x2["toJSON"].length === 0) {
|
|
@@ -574,7 +576,7 @@ var toJSON = (x2) => {
|
|
|
574
576
|
};
|
|
575
577
|
var format = (x2) => JSON.stringify(x2, null, 2);
|
|
576
578
|
|
|
577
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
579
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Option.js
|
|
578
580
|
var Option_exports = {};
|
|
579
581
|
__export(Option_exports, {
|
|
580
582
|
Do: () => Do,
|
|
@@ -636,7 +638,7 @@ __export(Option_exports, {
|
|
|
636
638
|
zipWith: () => zipWith
|
|
637
639
|
});
|
|
638
640
|
|
|
639
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
641
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Pipeable.js
|
|
640
642
|
var pipeArguments = (self, args) => {
|
|
641
643
|
switch (args.length) {
|
|
642
644
|
case 1:
|
|
@@ -667,7 +669,7 @@ var pipeArguments = (self, args) => {
|
|
|
667
669
|
}
|
|
668
670
|
};
|
|
669
671
|
|
|
670
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
672
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/internal/effectable.js
|
|
671
673
|
var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
|
|
672
674
|
var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
|
|
673
675
|
var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
|
|
@@ -725,7 +727,7 @@ var EffectPrototype = {
|
|
|
725
727
|
}
|
|
726
728
|
};
|
|
727
729
|
|
|
728
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
730
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/internal/option.js
|
|
729
731
|
var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
|
|
730
732
|
var CommonProto = {
|
|
731
733
|
...EffectPrototype,
|
|
@@ -782,7 +784,7 @@ var some = (value) => {
|
|
|
782
784
|
return a;
|
|
783
785
|
};
|
|
784
786
|
|
|
785
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
787
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/internal/either.js
|
|
786
788
|
var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
|
|
787
789
|
var CommonProto2 = {
|
|
788
790
|
...EffectPrototype,
|
|
@@ -846,10 +848,10 @@ var right = (right2) => {
|
|
|
846
848
|
var getLeft = (self) => isRight(self) ? none : some(self.left);
|
|
847
849
|
var getRight = (self) => isLeft(self) ? none : some(self.right);
|
|
848
850
|
|
|
849
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
851
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Order.js
|
|
850
852
|
var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
|
|
851
853
|
|
|
852
|
-
// ../../../node_modules/.pnpm/effect@2.3.
|
|
854
|
+
// ../../../node_modules/.pnpm/effect@2.3.6/node_modules/effect/dist/esm/Option.js
|
|
853
855
|
var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Option");
|
|
854
856
|
var none2 = () => none;
|
|
855
857
|
var some2 = some;
|
|
@@ -1013,7 +1015,7 @@ var gen = (f) => {
|
|
|
1013
1015
|
}
|
|
1014
1016
|
};
|
|
1015
1017
|
|
|
1016
|
-
// ../../../node_modules/.pnpm/ts-pattern@5.0.
|
|
1018
|
+
// ../../../node_modules/.pnpm/ts-pattern@5.0.8/node_modules/ts-pattern/dist/index.js
|
|
1017
1019
|
var t = Symbol.for("@ts-pattern/matcher");
|
|
1018
1020
|
var e = Symbol.for("@ts-pattern/isVariadic");
|
|
1019
1021
|
var n = "@ts-pattern/anonymous-select-key";
|
|
@@ -1059,7 +1061,7 @@ var o = (e2) => {
|
|
|
1059
1061
|
};
|
|
1060
1062
|
var c = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
|
|
1061
1063
|
function u(t2) {
|
|
1062
|
-
return Object.assign(t2, { optional: () => l(t2), and: (e2) => m(t2, e2), or: (e2) =>
|
|
1064
|
+
return Object.assign(t2, { optional: () => l(t2), and: (e2) => m(t2, e2), or: (e2) => d(t2, e2), select: (e2) => void 0 === e2 ? p(t2) : p(e2, t2) });
|
|
1063
1065
|
}
|
|
1064
1066
|
function l(e2) {
|
|
1065
1067
|
return u({ [t]: () => ({ match: (t2) => {
|
|
@@ -1079,7 +1081,7 @@ function m(...e2) {
|
|
|
1079
1081
|
return { matched: e2.every((e3) => s(e3, t2, r2)), selections: n2 };
|
|
1080
1082
|
}, getSelectionKeys: () => c(e2, o), matcherType: "and" }) });
|
|
1081
1083
|
}
|
|
1082
|
-
function
|
|
1084
|
+
function d(...e2) {
|
|
1083
1085
|
return u({ [t]: () => ({ match: (t2) => {
|
|
1084
1086
|
let n2 = {};
|
|
1085
1087
|
const r2 = (t3, e3) => {
|
|
@@ -1088,7 +1090,7 @@ function y(...e2) {
|
|
|
1088
1090
|
return c(e2, o).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => s(e3, t2, r2)), selections: n2 };
|
|
1089
1091
|
}, getSelectionKeys: () => c(e2, o), matcherType: "or" }) });
|
|
1090
1092
|
}
|
|
1091
|
-
function
|
|
1093
|
+
function y(e2) {
|
|
1092
1094
|
return { [t]: () => ({ match: (t2) => ({ matched: Boolean(e2(t2)) }) }) };
|
|
1093
1095
|
}
|
|
1094
1096
|
function p(...e2) {
|
|
@@ -1109,34 +1111,34 @@ function b(t2) {
|
|
|
1109
1111
|
function w(t2) {
|
|
1110
1112
|
return "bigint" == typeof t2;
|
|
1111
1113
|
}
|
|
1112
|
-
u(
|
|
1114
|
+
u(y(function(t2) {
|
|
1113
1115
|
return true;
|
|
1114
1116
|
}));
|
|
1115
1117
|
var j = (t2) => Object.assign(u(t2), { startsWith: (e2) => {
|
|
1116
|
-
return j(m(t2, (n2 = e2,
|
|
1118
|
+
return j(m(t2, (n2 = e2, y((t3) => b(t3) && t3.startsWith(n2)))));
|
|
1117
1119
|
var n2;
|
|
1118
1120
|
}, endsWith: (e2) => {
|
|
1119
|
-
return j(m(t2, (n2 = e2,
|
|
1121
|
+
return j(m(t2, (n2 = e2, y((t3) => b(t3) && t3.endsWith(n2)))));
|
|
1120
1122
|
var n2;
|
|
1121
|
-
}, minLength: (e2) => j(m(t2, ((t3) =>
|
|
1122
|
-
return j(m(t2, (n2 = e2,
|
|
1123
|
+
}, minLength: (e2) => j(m(t2, ((t3) => y((e3) => b(e3) && e3.length >= t3))(e2))), maxLength: (e2) => j(m(t2, ((t3) => y((e3) => b(e3) && e3.length <= t3))(e2))), includes: (e2) => {
|
|
1124
|
+
return j(m(t2, (n2 = e2, y((t3) => b(t3) && t3.includes(n2)))));
|
|
1123
1125
|
var n2;
|
|
1124
1126
|
}, regex: (e2) => {
|
|
1125
|
-
return j(m(t2, (n2 = e2,
|
|
1127
|
+
return j(m(t2, (n2 = e2, y((t3) => b(t3) && Boolean(t3.match(n2))))));
|
|
1126
1128
|
var n2;
|
|
1127
1129
|
} });
|
|
1128
|
-
j(
|
|
1129
|
-
var K = (t2) => Object.assign(u(t2), { between: (e2, n2) => K(m(t2, ((t3, e3) =>
|
|
1130
|
-
K(
|
|
1131
|
-
var
|
|
1132
|
-
|
|
1133
|
-
u(
|
|
1130
|
+
j(y(b));
|
|
1131
|
+
var K = (t2) => Object.assign(u(t2), { between: (e2, n2) => K(m(t2, ((t3, e3) => y((n3) => v(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => K(m(t2, ((t3) => y((e3) => v(e3) && e3 < t3))(e2))), gt: (e2) => K(m(t2, ((t3) => y((e3) => v(e3) && e3 > t3))(e2))), lte: (e2) => K(m(t2, ((t3) => y((e3) => v(e3) && e3 <= t3))(e2))), gte: (e2) => K(m(t2, ((t3) => y((e3) => v(e3) && e3 >= t3))(e2))), int: () => K(m(t2, y((t3) => v(t3) && Number.isInteger(t3)))), finite: () => K(m(t2, y((t3) => v(t3) && Number.isFinite(t3)))), positive: () => K(m(t2, y((t3) => v(t3) && t3 > 0))), negative: () => K(m(t2, y((t3) => v(t3) && t3 < 0))) });
|
|
1132
|
+
K(y(v));
|
|
1133
|
+
var A = (t2) => Object.assign(u(t2), { between: (e2, n2) => A(m(t2, ((t3, e3) => y((n3) => w(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => A(m(t2, ((t3) => y((e3) => w(e3) && e3 < t3))(e2))), gt: (e2) => A(m(t2, ((t3) => y((e3) => w(e3) && e3 > t3))(e2))), lte: (e2) => A(m(t2, ((t3) => y((e3) => w(e3) && e3 <= t3))(e2))), gte: (e2) => A(m(t2, ((t3) => y((e3) => w(e3) && e3 >= t3))(e2))), positive: () => A(m(t2, y((t3) => w(t3) && t3 > 0))), negative: () => A(m(t2, y((t3) => w(t3) && t3 < 0))) });
|
|
1134
|
+
A(y(w));
|
|
1135
|
+
u(y(function(t2) {
|
|
1134
1136
|
return "boolean" == typeof t2;
|
|
1135
1137
|
}));
|
|
1136
|
-
u(
|
|
1138
|
+
u(y(function(t2) {
|
|
1137
1139
|
return "symbol" == typeof t2;
|
|
1138
1140
|
}));
|
|
1139
|
-
u(
|
|
1141
|
+
u(y(function(t2) {
|
|
1140
1142
|
return null == t2;
|
|
1141
1143
|
}));
|
|
1142
1144
|
var W = { matched: false, value: void 0 };
|
|
@@ -1208,7 +1210,7 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
|
|
|
1208
1210
|
const pragma = getPragmaFromContext(context);
|
|
1209
1211
|
return {
|
|
1210
1212
|
CallExpression(node) {
|
|
1211
|
-
const initialScope = context.sourceCode.getScope
|
|
1213
|
+
const initialScope = context.sourceCode.getScope(node);
|
|
1212
1214
|
if (!isReactHookCall(node))
|
|
1213
1215
|
return;
|
|
1214
1216
|
if (!isUseCallbackCall(node, context, pragma) && !alias.some(Function_exports.flip(isReactHookCallWithNameLoose)(node))) {
|
|
@@ -1261,7 +1263,7 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
|
|
|
1261
1263
|
const pragma = getPragmaFromContext(context);
|
|
1262
1264
|
return {
|
|
1263
1265
|
CallExpression(node) {
|
|
1264
|
-
const initialScope = context.sourceCode.getScope
|
|
1266
|
+
const initialScope = context.sourceCode.getScope(node);
|
|
1265
1267
|
if (!isReactHookCall(node))
|
|
1266
1268
|
return;
|
|
1267
1269
|
if (!isUseMemoCall(node, context, pragma) && !alias.some(Function_exports.flip(isReactHookCallWithNameLoose)(node)))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-hooks-extra",
|
|
3
|
-
"version": "1.5.4-beta.
|
|
3
|
+
"version": "1.5.4-beta.6",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React Hooks related rules.",
|
|
5
5
|
"homepage": "https://github.com/rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
"./package.json"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@typescript-eslint/parser": ">=
|
|
39
|
-
"@typescript-eslint/scope-manager": ">=
|
|
40
|
-
"@typescript-eslint/type-utils": ">=
|
|
41
|
-
"@typescript-eslint/types": ">=
|
|
42
|
-
"@typescript-eslint/utils": ">=
|
|
38
|
+
"@typescript-eslint/parser": ">=7.0.1",
|
|
39
|
+
"@typescript-eslint/scope-manager": ">=7.0.1",
|
|
40
|
+
"@typescript-eslint/type-utils": ">=7.0.1",
|
|
41
|
+
"@typescript-eslint/types": ">=7.0.1",
|
|
42
|
+
"@typescript-eslint/utils": ">=7.0.1",
|
|
43
43
|
"string-ts": "2.0.0",
|
|
44
|
-
"@eslint-react/ast": "1.5.4-beta.
|
|
45
|
-
"@eslint-react/core": "1.5.4-beta.
|
|
46
|
-
"@eslint-react/jsx": "1.5.4-beta.
|
|
47
|
-
"@eslint-react/tools": "1.5.4-beta.
|
|
48
|
-
"@eslint-react/shared": "1.5.4-beta.
|
|
49
|
-
"@eslint-react/types": "1.5.4-beta.
|
|
50
|
-
"@eslint-react/var": "1.5.4-beta.
|
|
44
|
+
"@eslint-react/ast": "1.5.4-beta.6",
|
|
45
|
+
"@eslint-react/core": "1.5.4-beta.6",
|
|
46
|
+
"@eslint-react/jsx": "1.5.4-beta.6",
|
|
47
|
+
"@eslint-react/tools": "1.5.4-beta.6",
|
|
48
|
+
"@eslint-react/shared": "1.5.4-beta.6",
|
|
49
|
+
"@eslint-react/types": "1.5.4-beta.6",
|
|
50
|
+
"@eslint-react/var": "1.5.4-beta.6"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"effect": "2.3.
|
|
53
|
+
"effect": "2.3.6"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"eslint": ">=8.56.0",
|