eslint-plugin-react-web-api 5.11.2 → 5.12.0-beta.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.
Files changed (2) hide show
  1. package/dist/index.js +5 -6
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -28,7 +28,7 @@ var __exportAll = (all, no_symbols) => {
28
28
  //#endregion
29
29
  //#region package.json
30
30
  var name$1 = "eslint-plugin-react-web-api";
31
- var version = "5.11.2";
31
+ var version = "5.12.0-beta.0";
32
32
 
33
33
  //#endregion
34
34
  //#region src/types/component-phase.ts
@@ -74,12 +74,11 @@ const defaultOptions = {
74
74
  signal: null
75
75
  };
76
76
  function getOptions(context, node) {
77
- const initialScope = context.sourceCode.getScope(node);
78
- function getOpts(node) {
77
+ function visit(node) {
79
78
  switch (node.type) {
80
79
  case AST_NODE_TYPES.Identifier: {
81
80
  const initNode = resolve(context, node);
82
- if (initNode?.type === AST_NODE_TYPES.ObjectExpression) return getOpts(initNode);
81
+ if (initNode?.type === AST_NODE_TYPES.ObjectExpression) return visit(initNode);
83
82
  return defaultOptions;
84
83
  }
85
84
  case AST_NODE_TYPES.Literal: return {
@@ -91,7 +90,7 @@ function getOptions(context, node) {
91
90
  const value = prop.value;
92
91
  switch (value.type) {
93
92
  case AST_NODE_TYPES.Literal: return Boolean(value.value);
94
- default: return Boolean(getStaticValue(value, initialScope)?.value);
93
+ default: return Boolean(getStaticValue(value, context.sourceCode.getScope(node))?.value);
95
94
  }
96
95
  }).otherwise(() => false);
97
96
  const pSignal = findProperty$1(node.properties, "signal");
@@ -103,7 +102,7 @@ function getOptions(context, node) {
103
102
  default: return defaultOptions;
104
103
  }
105
104
  }
106
- return getOpts(node);
105
+ return visit(node);
107
106
  }
108
107
 
109
108
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-web-api",
3
- "version": "5.11.2",
3
+ "version": "5.12.0-beta.0",
4
4
  "description": "ESLint React's ESLint plugin for interacting with Web APIs",
5
5
  "keywords": [
6
6
  "react",
@@ -41,11 +41,11 @@
41
41
  "@typescript-eslint/utils": "^8.62.1",
42
42
  "birecord": "^0.1.1",
43
43
  "ts-pattern": "^5.9.0",
44
- "@eslint-react/ast": "5.11.2",
45
- "@eslint-react/core": "5.11.2",
46
- "@eslint-react/shared": "5.11.2",
47
- "@eslint-react/var": "5.11.2",
48
- "@eslint-react/eslint": "5.11.2"
44
+ "@eslint-react/ast": "5.12.0-beta.0",
45
+ "@eslint-react/core": "5.12.0-beta.0",
46
+ "@eslint-react/eslint": "5.12.0-beta.0",
47
+ "@eslint-react/shared": "5.12.0-beta.0",
48
+ "@eslint-react/var": "5.12.0-beta.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/react": "^19.2.17",
@@ -54,8 +54,8 @@
54
54
  "eslint": "^10.6.0",
55
55
  "tsdown": "^0.22.3",
56
56
  "typescript": "6.0.3",
57
- "@local/eff": "0.0.0",
58
- "@local/configs": "0.0.0"
57
+ "@local/configs": "0.0.0",
58
+ "@local/eff": "0.0.0"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "eslint": "*",