eslint-plugin-react-web-api 1.52.3-beta.9 → 1.52.3-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 CHANGED
@@ -56,7 +56,7 @@ var settings = {
56
56
 
57
57
  // package.json
58
58
  var name2 = "eslint-plugin-react-web-api";
59
- var version = "1.52.3-beta.9";
59
+ var version = "1.52.3-next.0";
60
60
  var createRule = utils.ESLintUtils.RuleCreator(shared.getDocsUrl("web-api"));
61
61
  function getPhaseKindOfFunction(node) {
62
62
  return tsPattern.match(node).when(ER4__namespace.isFunctionOfUseEffectSetup, () => "setup").when(ER4__namespace.isFunctionOfUseEffectCleanup, () => "cleanup").when(ER4__namespace.isFunctionOfComponentDidMount, () => "mount").when(ER4__namespace.isFunctionOfComponentWillUnmount, () => "unmount").otherwise(() => null);
@@ -68,7 +68,7 @@ var RULE_FEATURES = [];
68
68
  var defaultOptions = {
69
69
  capture: false,
70
70
  // once: false,
71
- signal: eff.unit
71
+ signal: eff._
72
72
  };
73
73
  function getCallKind(node) {
74
74
  switch (true) {
@@ -84,7 +84,7 @@ function getFunctionKind(node) {
84
84
  return getPhaseKindOfFunction(node) ?? "other";
85
85
  }
86
86
  function getSignalValueExpression(node, initialScope) {
87
- if (node == null) return eff.unit;
87
+ if (node == null) return eff._;
88
88
  switch (node.type) {
89
89
  case utils.AST_NODE_TYPES.Identifier: {
90
90
  return getSignalValueExpression(VAR__namespace.getVariableInitNode(VAR__namespace.findVariable(node, initialScope), 0), initialScope);
@@ -92,7 +92,7 @@ function getSignalValueExpression(node, initialScope) {
92
92
  case utils.AST_NODE_TYPES.MemberExpression:
93
93
  return node;
94
94
  default:
95
- return eff.unit;
95
+ return eff._;
96
96
  }
97
97
  }
98
98
  function getOptions(node, initialScope) {
@@ -100,7 +100,7 @@ function getOptions(node, initialScope) {
100
100
  return VAR__namespace.findPropertyInProperties(propName, properties, initialScope);
101
101
  }
102
102
  function getPropValue(prop, filter = (a) => true) {
103
- if (prop?.type !== utils.AST_NODE_TYPES.Property) return eff.unit;
103
+ if (prop?.type !== utils.AST_NODE_TYPES.Property) return eff._;
104
104
  const { value } = prop;
105
105
  let v = value;
106
106
  switch (value.type) {
@@ -113,7 +113,7 @@ function getOptions(node, initialScope) {
113
113
  break;
114
114
  }
115
115
  }
116
- return filter(v) ? v : eff.unit;
116
+ return filter(v) ? v : eff._;
117
117
  }
118
118
  function getOpts(node2) {
119
119
  switch (node2.type) {
@@ -132,7 +132,7 @@ function getOptions(node, initialScope) {
132
132
  const pCapture = findProp(node2.properties, "capture");
133
133
  const vCapture = !!getPropValue(pCapture);
134
134
  const pSignal = findProp(node2.properties, "signal");
135
- const vSignal = pSignal?.type === utils.AST_NODE_TYPES.Property ? getSignalValueExpression(pSignal.value, initialScope) : eff.unit;
135
+ const vSignal = pSignal?.type === utils.AST_NODE_TYPES.Property ? getSignalValueExpression(pSignal.value, initialScope) : eff._;
136
136
  return { capture: vCapture, signal: vSignal };
137
137
  }
138
138
  default: {
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { getDocsUrl, DEFAULT_ESLINT_REACT_SETTINGS } from '@eslint-react/shared';
2
2
  import * as AST from '@eslint-react/ast';
3
3
  import * as ER4 from '@eslint-react/core';
4
- import { unit, or } from '@eslint-react/eff';
4
+ import { _, or } from '@eslint-react/eff';
5
5
  import * as VAR from '@eslint-react/var';
6
6
  import { ESLintUtils, AST_NODE_TYPES } from '@typescript-eslint/utils';
7
7
  import { match, isMatching, P } from 'ts-pattern';
@@ -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.52.3-beta.9";
35
+ var version = "1.52.3-next.0";
36
36
  var createRule = ESLintUtils.RuleCreator(getDocsUrl("web-api"));
37
37
  function getPhaseKindOfFunction(node) {
38
38
  return match(node).when(ER4.isFunctionOfUseEffectSetup, () => "setup").when(ER4.isFunctionOfUseEffectCleanup, () => "cleanup").when(ER4.isFunctionOfComponentDidMount, () => "mount").when(ER4.isFunctionOfComponentWillUnmount, () => "unmount").otherwise(() => null);
@@ -44,7 +44,7 @@ var RULE_FEATURES = [];
44
44
  var defaultOptions = {
45
45
  capture: false,
46
46
  // once: false,
47
- signal: unit
47
+ signal: _
48
48
  };
49
49
  function getCallKind(node) {
50
50
  switch (true) {
@@ -60,7 +60,7 @@ function getFunctionKind(node) {
60
60
  return getPhaseKindOfFunction(node) ?? "other";
61
61
  }
62
62
  function getSignalValueExpression(node, initialScope) {
63
- if (node == null) return unit;
63
+ if (node == null) return _;
64
64
  switch (node.type) {
65
65
  case AST_NODE_TYPES.Identifier: {
66
66
  return getSignalValueExpression(VAR.getVariableInitNode(VAR.findVariable(node, initialScope), 0), initialScope);
@@ -68,7 +68,7 @@ function getSignalValueExpression(node, initialScope) {
68
68
  case AST_NODE_TYPES.MemberExpression:
69
69
  return node;
70
70
  default:
71
- return unit;
71
+ return _;
72
72
  }
73
73
  }
74
74
  function getOptions(node, initialScope) {
@@ -76,7 +76,7 @@ function getOptions(node, initialScope) {
76
76
  return VAR.findPropertyInProperties(propName, properties, initialScope);
77
77
  }
78
78
  function getPropValue(prop, filter = (a) => true) {
79
- if (prop?.type !== AST_NODE_TYPES.Property) return unit;
79
+ if (prop?.type !== AST_NODE_TYPES.Property) return _;
80
80
  const { value } = prop;
81
81
  let v = value;
82
82
  switch (value.type) {
@@ -89,7 +89,7 @@ function getOptions(node, initialScope) {
89
89
  break;
90
90
  }
91
91
  }
92
- return filter(v) ? v : unit;
92
+ return filter(v) ? v : _;
93
93
  }
94
94
  function getOpts(node2) {
95
95
  switch (node2.type) {
@@ -108,7 +108,7 @@ function getOptions(node, initialScope) {
108
108
  const pCapture = findProp(node2.properties, "capture");
109
109
  const vCapture = !!getPropValue(pCapture);
110
110
  const pSignal = findProp(node2.properties, "signal");
111
- const vSignal = pSignal?.type === AST_NODE_TYPES.Property ? getSignalValueExpression(pSignal.value, initialScope) : unit;
111
+ const vSignal = pSignal?.type === AST_NODE_TYPES.Property ? getSignalValueExpression(pSignal.value, initialScope) : _;
112
112
  return { capture: vCapture, signal: vSignal };
113
113
  }
114
114
  default: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-web-api",
3
- "version": "1.52.3-beta.9",
3
+ "version": "1.52.3-next.0",
4
4
  "description": "ESLint React's ESLint plugin for interacting with Web APIs",
5
5
  "keywords": [
6
6
  "react",
@@ -43,17 +43,17 @@
43
43
  "./package.json"
44
44
  ],
45
45
  "dependencies": {
46
- "@typescript-eslint/scope-manager": "^8.35.1",
47
- "@typescript-eslint/types": "^8.35.1",
48
- "@typescript-eslint/utils": "^8.35.1",
46
+ "@typescript-eslint/scope-manager": "^8.34.0",
47
+ "@typescript-eslint/types": "^8.34.0",
48
+ "@typescript-eslint/utils": "^8.34.0",
49
49
  "string-ts": "^2.2.1",
50
50
  "ts-pattern": "^5.7.1",
51
- "@eslint-react/ast": "1.52.3-beta.9",
52
- "@eslint-react/core": "1.52.3-beta.9",
53
- "@eslint-react/eff": "1.52.3-beta.9",
54
- "@eslint-react/kit": "1.52.3-beta.9",
55
- "@eslint-react/shared": "1.52.3-beta.9",
56
- "@eslint-react/var": "1.52.3-beta.9"
51
+ "@eslint-react/ast": "1.52.3-next.0",
52
+ "@eslint-react/core": "1.52.3-next.0",
53
+ "@eslint-react/kit": "1.52.3-next.0",
54
+ "@eslint-react/eff": "1.52.3-next.0",
55
+ "@eslint-react/shared": "1.52.3-next.0",
56
+ "@eslint-react/var": "1.52.3-next.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/react": "^19.1.8",