eslint-plugin-react-web-api 1.36.2-beta.1 → 1.36.2-next.0
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 +13 -5
- package/dist/index.mjs +13 -5
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -55,7 +55,7 @@ var settings = {
|
|
|
55
55
|
|
|
56
56
|
// package.json
|
|
57
57
|
var name2 = "eslint-plugin-react-web-api";
|
|
58
|
-
var version = "1.36.2-
|
|
58
|
+
var version = "1.36.2-next.0";
|
|
59
59
|
var createRule = shared.createRuleForPlugin("web-api");
|
|
60
60
|
function getPhaseKindOfFunction(node) {
|
|
61
61
|
return tsPattern.match(node).when(core.isFunctionOfUseEffectSetup, () => "setup").when(core.isFunctionOfUseEffectCleanup, () => "cleanup").when(core.isFunctionOfComponentDidMount, () => "mount").when(core.isFunctionOfComponentWillUnmount, () => "unmount").otherwise(() => eff._);
|
|
@@ -63,7 +63,9 @@ function getPhaseKindOfFunction(node) {
|
|
|
63
63
|
|
|
64
64
|
// src/rules/no-leaked-event-listener.ts
|
|
65
65
|
var RULE_NAME = "no-leaked-event-listener";
|
|
66
|
-
var RULE_FEATURES = [
|
|
66
|
+
var RULE_FEATURES = [
|
|
67
|
+
"CHK"
|
|
68
|
+
];
|
|
67
69
|
var defaultOptions = {
|
|
68
70
|
capture: false,
|
|
69
71
|
// once: false,
|
|
@@ -291,7 +293,9 @@ function create(context) {
|
|
|
291
293
|
};
|
|
292
294
|
}
|
|
293
295
|
var RULE_NAME2 = "no-leaked-interval";
|
|
294
|
-
var RULE_FEATURES2 = [
|
|
296
|
+
var RULE_FEATURES2 = [
|
|
297
|
+
"CHK"
|
|
298
|
+
];
|
|
295
299
|
function getCallKind2(node) {
|
|
296
300
|
switch (true) {
|
|
297
301
|
case (node.callee.type === utils.AST_NODE_TYPES.Identifier && tsPattern.isMatching(tsPattern.P.union("setInterval", "clearInterval"))(node.callee.name)):
|
|
@@ -420,7 +424,9 @@ function create2(context) {
|
|
|
420
424
|
};
|
|
421
425
|
}
|
|
422
426
|
var RULE_NAME3 = "no-leaked-resize-observer";
|
|
423
|
-
var RULE_FEATURES3 = [
|
|
427
|
+
var RULE_FEATURES3 = [
|
|
428
|
+
"CHK"
|
|
429
|
+
];
|
|
424
430
|
function isNewResizeObserver(node) {
|
|
425
431
|
return node?.type === utils.AST_NODE_TYPES.NewExpression && node.callee.type === utils.AST_NODE_TYPES.Identifier && node.callee.name === "ResizeObserver";
|
|
426
432
|
}
|
|
@@ -582,7 +588,9 @@ function create3(context) {
|
|
|
582
588
|
};
|
|
583
589
|
}
|
|
584
590
|
var RULE_NAME4 = "no-leaked-timeout";
|
|
585
|
-
var RULE_FEATURES4 = [
|
|
591
|
+
var RULE_FEATURES4 = [
|
|
592
|
+
"CHK"
|
|
593
|
+
];
|
|
586
594
|
function getCallKind4(node) {
|
|
587
595
|
switch (true) {
|
|
588
596
|
case (node.callee.type === utils.AST_NODE_TYPES.Identifier && tsPattern.isMatching(tsPattern.P.union("setTimeout", "clearTimeout"))(node.callee.name)):
|
package/dist/index.mjs
CHANGED
|
@@ -32,7 +32,7 @@ var settings = {
|
|
|
32
32
|
|
|
33
33
|
// package.json
|
|
34
34
|
var name2 = "eslint-plugin-react-web-api";
|
|
35
|
-
var version = "1.36.2-
|
|
35
|
+
var version = "1.36.2-next.0";
|
|
36
36
|
var createRule = createRuleForPlugin("web-api");
|
|
37
37
|
function getPhaseKindOfFunction(node) {
|
|
38
38
|
return match(node).when(isFunctionOfUseEffectSetup, () => "setup").when(isFunctionOfUseEffectCleanup, () => "cleanup").when(isFunctionOfComponentDidMount, () => "mount").when(isFunctionOfComponentWillUnmount, () => "unmount").otherwise(() => _);
|
|
@@ -40,7 +40,9 @@ function getPhaseKindOfFunction(node) {
|
|
|
40
40
|
|
|
41
41
|
// src/rules/no-leaked-event-listener.ts
|
|
42
42
|
var RULE_NAME = "no-leaked-event-listener";
|
|
43
|
-
var RULE_FEATURES = [
|
|
43
|
+
var RULE_FEATURES = [
|
|
44
|
+
"CHK"
|
|
45
|
+
];
|
|
44
46
|
var defaultOptions = {
|
|
45
47
|
capture: false,
|
|
46
48
|
// once: false,
|
|
@@ -268,7 +270,9 @@ function create(context) {
|
|
|
268
270
|
};
|
|
269
271
|
}
|
|
270
272
|
var RULE_NAME2 = "no-leaked-interval";
|
|
271
|
-
var RULE_FEATURES2 = [
|
|
273
|
+
var RULE_FEATURES2 = [
|
|
274
|
+
"CHK"
|
|
275
|
+
];
|
|
272
276
|
function getCallKind2(node) {
|
|
273
277
|
switch (true) {
|
|
274
278
|
case (node.callee.type === AST_NODE_TYPES.Identifier && isMatching(P.union("setInterval", "clearInterval"))(node.callee.name)):
|
|
@@ -397,7 +401,9 @@ function create2(context) {
|
|
|
397
401
|
};
|
|
398
402
|
}
|
|
399
403
|
var RULE_NAME3 = "no-leaked-resize-observer";
|
|
400
|
-
var RULE_FEATURES3 = [
|
|
404
|
+
var RULE_FEATURES3 = [
|
|
405
|
+
"CHK"
|
|
406
|
+
];
|
|
401
407
|
function isNewResizeObserver(node) {
|
|
402
408
|
return node?.type === AST_NODE_TYPES.NewExpression && node.callee.type === AST_NODE_TYPES.Identifier && node.callee.name === "ResizeObserver";
|
|
403
409
|
}
|
|
@@ -559,7 +565,9 @@ function create3(context) {
|
|
|
559
565
|
};
|
|
560
566
|
}
|
|
561
567
|
var RULE_NAME4 = "no-leaked-timeout";
|
|
562
|
-
var RULE_FEATURES4 = [
|
|
568
|
+
var RULE_FEATURES4 = [
|
|
569
|
+
"CHK"
|
|
570
|
+
];
|
|
563
571
|
function getCallKind4(node) {
|
|
564
572
|
switch (true) {
|
|
565
573
|
case (node.callee.type === AST_NODE_TYPES.Identifier && isMatching(P.union("setTimeout", "clearTimeout"))(node.callee.name)):
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-web-api",
|
|
3
|
-
"version": "1.36.2-
|
|
3
|
+
"version": "1.36.2-next.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for interacting with Web APIs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"@typescript-eslint/utils": "^8.26.1",
|
|
49
49
|
"string-ts": "^2.2.1",
|
|
50
50
|
"ts-pattern": "^5.6.2",
|
|
51
|
-
"@eslint-react/ast": "1.36.2-
|
|
52
|
-
"@eslint-react/
|
|
53
|
-
"@eslint-react/
|
|
54
|
-
"@eslint-react/jsx": "1.36.2-
|
|
55
|
-
"@eslint-react/
|
|
56
|
-
"@eslint-react/
|
|
51
|
+
"@eslint-react/ast": "1.36.2-next.0",
|
|
52
|
+
"@eslint-react/core": "1.36.2-next.0",
|
|
53
|
+
"@eslint-react/eff": "1.36.2-next.0",
|
|
54
|
+
"@eslint-react/jsx": "1.36.2-next.0",
|
|
55
|
+
"@eslint-react/var": "1.36.2-next.0",
|
|
56
|
+
"@eslint-react/shared": "1.36.2-next.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/react": "^19.0.11",
|