eslint-plugin-react-web-api 1.17.2-next.6 → 1.17.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.
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ var VAR2__namespace = /*#__PURE__*/_interopNamespace(VAR2);
35
35
 
36
36
  // package.json
37
37
  var name = "eslint-plugin-react-web-api";
38
- var version = "1.17.2-next.6";
38
+ var version = "1.17.2";
39
39
  var createRule = shared.createRuleForPlugin("web-api");
40
40
  function getInstanceID(node, prev) {
41
41
  switch (true) {
@@ -204,7 +204,7 @@ var no_leaked_event_listener_default = createRule({
204
204
  ["CallExpression"](node) {
205
205
  const [fNode, fKind] = fStack.findLast((f) => f.at(1) !== "other") ?? [];
206
206
  if (!fNode || !fKind) return;
207
- if (!core.PHASE_RELEVANCE.has(fKind)) return;
207
+ if (!core.ERPhaseRelevance.has(fKind)) return;
208
208
  tsPattern.match(getCallKind(node)).with("addEventListener", (callKind) => {
209
209
  const [type, listener, options] = node.arguments;
210
210
  if (!type || !listener) return;
@@ -312,7 +312,7 @@ var no_leaked_interval_default = createRule({
312
312
  case "clearInterval": {
313
313
  const [fNode, fKind] = fStack.findLast((f) => f.at(1) !== "other") ?? [];
314
314
  if (!fNode || !fKind) break;
315
- if (!core.PHASE_RELEVANCE.has(fKind)) break;
315
+ if (!core.ERPhaseRelevance.has(fKind)) break;
316
316
  const [intervalIdNode] = node.arguments;
317
317
  if (!intervalIdNode) break;
318
318
  cEntries.push({
@@ -327,7 +327,7 @@ var no_leaked_interval_default = createRule({
327
327
  case "setInterval": {
328
328
  const [fNode, fKind] = fStack.findLast((f) => f.at(1) !== "other") ?? [];
329
329
  if (!fNode || !fKind) break;
330
- if (!core.PHASE_RELEVANCE.has(fKind)) break;
330
+ if (!core.ERPhaseRelevance.has(fKind)) break;
331
331
  const intervalIdNode = tools.O.getOrNull(VAR2__namespace.getVariableDeclaratorID(node));
332
332
  if (!intervalIdNode) {
333
333
  context.report({
@@ -441,7 +441,7 @@ var no_leaked_resize_observer_default = createRule({
441
441
  ["CallExpression"](node) {
442
442
  const [_, fKind] = fStack.findLast((f) => f.at(1) !== "other") ?? [];
443
443
  if (node.callee.type !== utils.AST_NODE_TYPES.MemberExpression) return;
444
- if (!core.PHASE_RELEVANCE.has(fKind)) return;
444
+ if (!core.ERPhaseRelevance.has(fKind)) return;
445
445
  const { object } = node.callee;
446
446
  tsPattern.match(getCallKind3(node, context)).with("disconnect", () => {
447
447
  dEntries.push(
@@ -483,7 +483,7 @@ var no_leaked_resize_observer_default = createRule({
483
483
  },
484
484
  ["NewExpression"](node) {
485
485
  const [fNode, fKind] = fStack.findLast((f) => f.at(1) !== "other") ?? [];
486
- if (!fNode || !core.PHASE_RELEVANCE.has(fKind)) return;
486
+ if (!fNode || !core.ERPhaseRelevance.has(fKind)) return;
487
487
  if (!isNewResizeObserver(node)) return;
488
488
  const id = getInstanceID(node);
489
489
  if (tools.O.isNone(id)) {
@@ -561,7 +561,7 @@ var no_leaked_timeout_default = createRule({
561
561
  ["CallExpression"](node) {
562
562
  const [fNode, fKind] = fStack.findLast((f) => f.at(1) !== "other") ?? [];
563
563
  if (!fNode || !fKind) return;
564
- if (!core.PHASE_RELEVANCE.has(fKind)) return;
564
+ if (!core.ERPhaseRelevance.has(fKind)) return;
565
565
  switch (getCallKind4(node)) {
566
566
  case "clearTimeout": {
567
567
  const [timeoutIdNode] = node.arguments;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as AST2 from '@eslint-react/ast';
2
- import { isInversePhase, PHASE_RELEVANCE, isSetupFunction, isCleanupFunction, isComponentDidMountFunction, isComponentWillUnmountFunction } from '@eslint-react/core';
2
+ import { isInversePhase, ERPhaseRelevance, isSetupFunction, isCleanupFunction, isComponentDidMountFunction, isComponentWillUnmountFunction } from '@eslint-react/core';
3
3
  import * as JSX from '@eslint-react/jsx';
4
4
  import { Data, O, F, or, not, isBoolean } from '@eslint-react/tools';
5
5
  import * as VAR2 from '@eslint-react/var';
@@ -11,7 +11,7 @@ import { AST_NODE_TYPES as AST_NODE_TYPES$1 } from '@typescript-eslint/types';
11
11
 
12
12
  // package.json
13
13
  var name = "eslint-plugin-react-web-api";
14
- var version = "1.17.2-next.6";
14
+ var version = "1.17.2";
15
15
  var createRule = createRuleForPlugin("web-api");
16
16
  function getInstanceID(node, prev) {
17
17
  switch (true) {
@@ -180,7 +180,7 @@ var no_leaked_event_listener_default = createRule({
180
180
  ["CallExpression"](node) {
181
181
  const [fNode, fKind] = fStack.findLast((f) => f.at(1) !== "other") ?? [];
182
182
  if (!fNode || !fKind) return;
183
- if (!PHASE_RELEVANCE.has(fKind)) return;
183
+ if (!ERPhaseRelevance.has(fKind)) return;
184
184
  match(getCallKind(node)).with("addEventListener", (callKind) => {
185
185
  const [type, listener, options] = node.arguments;
186
186
  if (!type || !listener) return;
@@ -288,7 +288,7 @@ var no_leaked_interval_default = createRule({
288
288
  case "clearInterval": {
289
289
  const [fNode, fKind] = fStack.findLast((f) => f.at(1) !== "other") ?? [];
290
290
  if (!fNode || !fKind) break;
291
- if (!PHASE_RELEVANCE.has(fKind)) break;
291
+ if (!ERPhaseRelevance.has(fKind)) break;
292
292
  const [intervalIdNode] = node.arguments;
293
293
  if (!intervalIdNode) break;
294
294
  cEntries.push({
@@ -303,7 +303,7 @@ var no_leaked_interval_default = createRule({
303
303
  case "setInterval": {
304
304
  const [fNode, fKind] = fStack.findLast((f) => f.at(1) !== "other") ?? [];
305
305
  if (!fNode || !fKind) break;
306
- if (!PHASE_RELEVANCE.has(fKind)) break;
306
+ if (!ERPhaseRelevance.has(fKind)) break;
307
307
  const intervalIdNode = O.getOrNull(VAR2.getVariableDeclaratorID(node));
308
308
  if (!intervalIdNode) {
309
309
  context.report({
@@ -417,7 +417,7 @@ var no_leaked_resize_observer_default = createRule({
417
417
  ["CallExpression"](node) {
418
418
  const [_, fKind] = fStack.findLast((f) => f.at(1) !== "other") ?? [];
419
419
  if (node.callee.type !== AST_NODE_TYPES.MemberExpression) return;
420
- if (!PHASE_RELEVANCE.has(fKind)) return;
420
+ if (!ERPhaseRelevance.has(fKind)) return;
421
421
  const { object } = node.callee;
422
422
  match(getCallKind3(node, context)).with("disconnect", () => {
423
423
  dEntries.push(
@@ -459,7 +459,7 @@ var no_leaked_resize_observer_default = createRule({
459
459
  },
460
460
  ["NewExpression"](node) {
461
461
  const [fNode, fKind] = fStack.findLast((f) => f.at(1) !== "other") ?? [];
462
- if (!fNode || !PHASE_RELEVANCE.has(fKind)) return;
462
+ if (!fNode || !ERPhaseRelevance.has(fKind)) return;
463
463
  if (!isNewResizeObserver(node)) return;
464
464
  const id = getInstanceID(node);
465
465
  if (O.isNone(id)) {
@@ -537,7 +537,7 @@ var no_leaked_timeout_default = createRule({
537
537
  ["CallExpression"](node) {
538
538
  const [fNode, fKind] = fStack.findLast((f) => f.at(1) !== "other") ?? [];
539
539
  if (!fNode || !fKind) return;
540
- if (!PHASE_RELEVANCE.has(fKind)) return;
540
+ if (!ERPhaseRelevance.has(fKind)) return;
541
541
  switch (getCallKind4(node)) {
542
542
  case "clearTimeout": {
543
543
  const [timeoutIdNode] = node.arguments;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-web-api",
3
- "version": "1.17.2-next.6",
3
+ "version": "1.17.2",
4
4
  "description": "ESLint React's ESLint plugin for interacting with Web APIs",
5
5
  "keywords": [
6
6
  "eslint",
@@ -47,13 +47,13 @@
47
47
  "@typescript-eslint/utils": "^8.16.0",
48
48
  "birecord": "^0.1.1",
49
49
  "ts-pattern": "^5.5.0",
50
- "@eslint-react/ast": "1.17.2-next.6",
51
- "@eslint-react/shared": "1.17.2-next.6",
52
- "@eslint-react/jsx": "1.17.2-next.6",
53
- "@eslint-react/core": "1.17.2-next.6",
54
- "@eslint-react/tools": "1.17.2-next.6",
55
- "@eslint-react/var": "1.17.2-next.6",
56
- "@eslint-react/types": "1.17.2-next.6"
50
+ "@eslint-react/ast": "1.17.2",
51
+ "@eslint-react/shared": "1.17.2",
52
+ "@eslint-react/core": "1.17.2",
53
+ "@eslint-react/jsx": "1.17.2",
54
+ "@eslint-react/tools": "1.17.2",
55
+ "@eslint-react/types": "1.17.2",
56
+ "@eslint-react/var": "1.17.2"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/react": "^18.3.12",