eslint-plugin-react-web-api 5.20.5 → 5.20.7
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 +4 -4
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { ESLintUtils } from "@typescript-eslint/utils";
|
|
|
3
3
|
import { Check, Compare, Extract, Traverse } from "@eslint-react/ast";
|
|
4
4
|
import { isUseEffectCleanupCallback, isUseEffectSetupCallback } from "@eslint-react/core";
|
|
5
5
|
import "@eslint-react/eslint";
|
|
6
|
-
import { isAssignmentTargetEqual, isInitializedFromReactNative, isValueEqual, resolve, resolveEnclosingAssignmentTarget } from "@eslint-react/var";
|
|
6
|
+
import { isAssignmentTargetEqual, isInitializedFromReactNative, isValueEqual, resolve, resolveEnclosingAssignmentTarget, resolveOrigin } from "@eslint-react/var";
|
|
7
7
|
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
8
8
|
import { P, isMatching, match } from "ts-pattern";
|
|
9
9
|
import { getStaticValue } from "@typescript-eslint/utils/ast-utils";
|
|
@@ -27,7 +27,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region package.json
|
|
29
29
|
var name$1 = "eslint-plugin-react-web-api";
|
|
30
|
-
var version = "5.20.
|
|
30
|
+
var version = "5.20.7";
|
|
31
31
|
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/utils/create-rule.ts
|
|
@@ -42,7 +42,7 @@ function getSignalValueExpression(context, node) {
|
|
|
42
42
|
if (node == null) return null;
|
|
43
43
|
switch (node.type) {
|
|
44
44
|
case AST_NODE_TYPES.Identifier: {
|
|
45
|
-
const resolved =
|
|
45
|
+
const resolved = resolveOrigin(context, node);
|
|
46
46
|
const unwrapped = resolved == null ? null : Extract.unwrap(resolved);
|
|
47
47
|
if (unwrapped != null && Check.isFunction(unwrapped)) return node;
|
|
48
48
|
return getSignalValueExpression(context, unwrapped);
|
|
@@ -236,7 +236,7 @@ function getControllerFromSignal(context, node) {
|
|
|
236
236
|
isParamSignal: false
|
|
237
237
|
};
|
|
238
238
|
case AST_NODE_TYPES.Identifier: {
|
|
239
|
-
const resolved =
|
|
239
|
+
const resolved = resolveOrigin(context, node);
|
|
240
240
|
const resolvedUnwrapped = resolved == null ? null : Extract.unwrap(resolved);
|
|
241
241
|
if (resolvedUnwrapped?.type === AST_NODE_TYPES.MemberExpression) return {
|
|
242
242
|
controller: resolvedUnwrapped.object,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-web-api",
|
|
3
|
-
"version": "5.20.
|
|
3
|
+
"version": "5.20.7",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for interacting with Web APIs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@eslint-react/ast": "5.20.
|
|
41
|
-
"@eslint-react/core": "5.20.
|
|
42
|
-
"@eslint-react/eslint": "5.20.
|
|
43
|
-
"@eslint-react/shared": "5.20.
|
|
44
|
-
"@eslint-react/var": "5.20.
|
|
40
|
+
"@eslint-react/ast": "5.20.7",
|
|
41
|
+
"@eslint-react/core": "5.20.7",
|
|
42
|
+
"@eslint-react/eslint": "5.20.7",
|
|
43
|
+
"@eslint-react/shared": "5.20.7",
|
|
44
|
+
"@eslint-react/var": "5.20.7",
|
|
45
45
|
"@typescript-eslint/types": "^8.70.0",
|
|
46
46
|
"@typescript-eslint/utils": "^8.70.0",
|
|
47
47
|
"ts-pattern": "^5.9.0"
|