eslint-plugin-react-web-api 5.10.1 → 5.10.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 +9 -9
- package/package.json +6 -6
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.10.
|
|
31
|
+
var version = "5.10.2";
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region src/types/component-phase.ts
|
|
@@ -46,11 +46,11 @@ const createRule = ESLintUtils.RuleCreator(getDocsUrl);
|
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/rules/no-leaked-event-listener/lib.ts
|
|
49
|
-
function findProperty$1(
|
|
50
|
-
for (const property of
|
|
51
|
-
if (property.type === AST_NODE_TYPES.Property && Extract.getPropertyName(property.key) ===
|
|
49
|
+
function findProperty$1(node, name) {
|
|
50
|
+
for (const property of node) {
|
|
51
|
+
if (property.type === AST_NODE_TYPES.Property && Extract.getPropertyName(property.key, (n) => property.computed ? null : n.name) === name) return property;
|
|
52
52
|
if (property.type === AST_NODE_TYPES.SpreadElement && property.argument.type === AST_NODE_TYPES.ObjectExpression) {
|
|
53
|
-
const found = findProperty$1(property.argument.properties,
|
|
53
|
+
const found = findProperty$1(property.argument.properties, name);
|
|
54
54
|
if (found != null) return found;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -235,11 +235,11 @@ function create$5(context) {
|
|
|
235
235
|
|
|
236
236
|
//#endregion
|
|
237
237
|
//#region src/rules/no-leaked-fetch/lib.ts
|
|
238
|
-
function findProperty(
|
|
239
|
-
for (const property of
|
|
240
|
-
if (property.type === AST_NODE_TYPES.Property && Extract.getPropertyName(property.key) ===
|
|
238
|
+
function findProperty(node, name) {
|
|
239
|
+
for (const property of node) {
|
|
240
|
+
if (property.type === AST_NODE_TYPES.Property && Extract.getPropertyName(property.key, (n) => property.computed ? null : n.name) === name) return property;
|
|
241
241
|
if (property.type === AST_NODE_TYPES.SpreadElement && property.argument.type === AST_NODE_TYPES.ObjectExpression) {
|
|
242
|
-
const found = findProperty(property.argument.properties,
|
|
242
|
+
const found = findProperty(property.argument.properties, name);
|
|
243
243
|
if (found != null) return found;
|
|
244
244
|
}
|
|
245
245
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-web-api",
|
|
3
|
-
"version": "5.10.
|
|
3
|
+
"version": "5.10.2",
|
|
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/
|
|
45
|
-
"@eslint-react/
|
|
46
|
-
"@eslint-react/
|
|
47
|
-
"@eslint-react/shared": "5.10.
|
|
48
|
-
"@eslint-react/var": "5.10.
|
|
44
|
+
"@eslint-react/core": "5.10.2",
|
|
45
|
+
"@eslint-react/eslint": "5.10.2",
|
|
46
|
+
"@eslint-react/ast": "5.10.2",
|
|
47
|
+
"@eslint-react/shared": "5.10.2",
|
|
48
|
+
"@eslint-react/var": "5.10.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/react": "^19.2.17",
|