eslint-plugin-react-web-api 1.15.0-next.7 → 1.15.0-next.9

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.15.0-next.7";
38
+ var version = "1.15.0-next.9";
39
39
  var createRule = shared.createRuleForPlugin("web-api");
40
40
  function getInstanceID(node, prev) {
41
41
  switch (true) {
@@ -104,7 +104,25 @@ function getOptions(node, initialScope) {
104
104
  const pCapture = findProp(node2.properties, "capture");
105
105
  const vCapture = tools.O.flatMap(pCapture, getPropValue).pipe(tools.O.filter(tools.isBoolean));
106
106
  const pSignal = findProp(node2.properties, "signal");
107
- const vSignal = tools.O.flatMapNullable(pSignal, (prop) => prop.type === utils.AST_NODE_TYPES.Property ? prop.value : null);
107
+ const vSignal = tools.O.flatMap(pSignal, (prop) => {
108
+ if (prop.type !== utils.AST_NODE_TYPES.Property) return tools.O.none();
109
+ const { value } = prop;
110
+ const getSignalExp = (node3) => {
111
+ switch (node3.type) {
112
+ case utils.AST_NODE_TYPES.MemberExpression:
113
+ return tools.O.some(node3);
114
+ case utils.AST_NODE_TYPES.Identifier:
115
+ return tools.F.pipe(
116
+ VAR2__namespace.findVariable(node3, initialScope),
117
+ tools.O.flatMap(VAR2__namespace.getVariableNode(0)),
118
+ tools.O.flatMap(getSignalExp)
119
+ );
120
+ default:
121
+ return tools.O.none();
122
+ }
123
+ };
124
+ return getSignalExp(value);
125
+ });
108
126
  return tools.Data.struct({ capture: vCapture, once: vOnce, signal: vSignal });
109
127
  }
110
128
  case utils.AST_NODE_TYPES.Identifier: {
package/dist/index.mjs CHANGED
@@ -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.15.0-next.7";
14
+ var version = "1.15.0-next.9";
15
15
  var createRule = createRuleForPlugin("web-api");
16
16
  function getInstanceID(node, prev) {
17
17
  switch (true) {
@@ -80,7 +80,25 @@ function getOptions(node, initialScope) {
80
80
  const pCapture = findProp(node2.properties, "capture");
81
81
  const vCapture = O.flatMap(pCapture, getPropValue).pipe(O.filter(isBoolean));
82
82
  const pSignal = findProp(node2.properties, "signal");
83
- const vSignal = O.flatMapNullable(pSignal, (prop) => prop.type === AST_NODE_TYPES.Property ? prop.value : null);
83
+ const vSignal = O.flatMap(pSignal, (prop) => {
84
+ if (prop.type !== AST_NODE_TYPES.Property) return O.none();
85
+ const { value } = prop;
86
+ const getSignalExp = (node3) => {
87
+ switch (node3.type) {
88
+ case AST_NODE_TYPES.MemberExpression:
89
+ return O.some(node3);
90
+ case AST_NODE_TYPES.Identifier:
91
+ return F.pipe(
92
+ VAR2.findVariable(node3, initialScope),
93
+ O.flatMap(VAR2.getVariableNode(0)),
94
+ O.flatMap(getSignalExp)
95
+ );
96
+ default:
97
+ return O.none();
98
+ }
99
+ };
100
+ return getSignalExp(value);
101
+ });
84
102
  return Data.struct({ capture: vCapture, once: vOnce, signal: vSignal });
85
103
  }
86
104
  case AST_NODE_TYPES.Identifier: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-web-api",
3
- "version": "1.15.0-next.7",
3
+ "version": "1.15.0-next.9",
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.8.1",
48
48
  "birecord": "^0.1.1",
49
49
  "ts-pattern": "^5.4.0",
50
- "@eslint-react/ast": "1.15.0-next.7",
51
- "@eslint-react/core": "1.15.0-next.7",
52
- "@eslint-react/jsx": "1.15.0-next.7",
53
- "@eslint-react/shared": "1.15.0-next.7",
54
- "@eslint-react/tools": "1.15.0-next.7",
55
- "@eslint-react/types": "1.15.0-next.7",
56
- "@eslint-react/var": "1.15.0-next.7"
50
+ "@eslint-react/ast": "1.15.0-next.9",
51
+ "@eslint-react/shared": "1.15.0-next.9",
52
+ "@eslint-react/jsx": "1.15.0-next.9",
53
+ "@eslint-react/tools": "1.15.0-next.9",
54
+ "@eslint-react/types": "1.15.0-next.9",
55
+ "@eslint-react/var": "1.15.0-next.9",
56
+ "@eslint-react/core": "1.15.0-next.9"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/react": "^18.3.11",