eslint-plugin-react-web-api 3.0.0-next.62 → 3.0.0-next.63
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 +6 -6
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import { DEFAULT_ESLINT_REACT_SETTINGS, WEBSITE_URL, defineRuleListener } from "
|
|
|
2
2
|
import * as ast from "@eslint-react/ast";
|
|
3
3
|
import * as core from "@eslint-react/core";
|
|
4
4
|
import { dual, or, unit } from "@eslint-react/eff";
|
|
5
|
-
import { findEnclosingAssignmentTarget,
|
|
5
|
+
import { findEnclosingAssignmentTarget, isAssignmentTargetEqual, isValueEqual } from "@eslint-react/var";
|
|
6
6
|
import { AST_NODE_TYPES, ESLintUtils } from "@typescript-eslint/utils";
|
|
7
|
-
import { getStaticValue } from "@typescript-eslint/utils/ast-utils";
|
|
7
|
+
import { findVariable, getStaticValue } from "@typescript-eslint/utils/ast-utils";
|
|
8
8
|
import { P, isMatching, match } from "ts-pattern";
|
|
9
9
|
import birecord from "birecord";
|
|
10
10
|
|
|
@@ -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 = "3.0.0-next.
|
|
30
|
+
var version = "3.0.0-next.63";
|
|
31
31
|
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/types/component-phase.ts
|
|
@@ -67,7 +67,7 @@ function getFunctionKind$1(node) {
|
|
|
67
67
|
function getSignalValueExpression(node, initialScope) {
|
|
68
68
|
if (node == null) return unit;
|
|
69
69
|
switch (node.type) {
|
|
70
|
-
case AST_NODE_TYPES.Identifier: return getSignalValueExpression(resolve$1(findVariable(
|
|
70
|
+
case AST_NODE_TYPES.Identifier: return getSignalValueExpression(resolve$1(findVariable(initialScope, node)), initialScope);
|
|
71
71
|
case AST_NODE_TYPES.MemberExpression: return node;
|
|
72
72
|
default: return unit;
|
|
73
73
|
}
|
|
@@ -76,7 +76,7 @@ function getOptions(node, initialScope) {
|
|
|
76
76
|
function getOpts(node) {
|
|
77
77
|
switch (node.type) {
|
|
78
78
|
case AST_NODE_TYPES.Identifier: {
|
|
79
|
-
const variableNode = resolve$1(findVariable(
|
|
79
|
+
const variableNode = resolve$1(findVariable(initialScope, node));
|
|
80
80
|
if (variableNode?.type === AST_NODE_TYPES.ObjectExpression) return getOpts(variableNode);
|
|
81
81
|
return defaultOptions;
|
|
82
82
|
}
|
|
@@ -348,7 +348,7 @@ function isNewResizeObserver(node) {
|
|
|
348
348
|
}
|
|
349
349
|
function isFromObserver(context, node) {
|
|
350
350
|
switch (true) {
|
|
351
|
-
case node.type === AST_NODE_TYPES.Identifier: return isNewResizeObserver(resolve(findVariable(
|
|
351
|
+
case node.type === AST_NODE_TYPES.Identifier: return isNewResizeObserver(resolve(findVariable(context.sourceCode.getScope(node), node)));
|
|
352
352
|
case node.type === AST_NODE_TYPES.MemberExpression: return isFromObserver(context, node.object);
|
|
353
353
|
default: return false;
|
|
354
354
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-web-api",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.63",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for interacting with Web APIs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"@typescript-eslint/utils": "canary",
|
|
44
44
|
"birecord": "^0.1.1",
|
|
45
45
|
"ts-pattern": "^5.9.0",
|
|
46
|
-
"@eslint-react/ast": "3.0.0-next.
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/eff": "3.0.0-next.
|
|
49
|
-
"@eslint-react/
|
|
50
|
-
"@eslint-react/
|
|
46
|
+
"@eslint-react/ast": "3.0.0-next.63",
|
|
47
|
+
"@eslint-react/core": "3.0.0-next.63",
|
|
48
|
+
"@eslint-react/eff": "3.0.0-next.63",
|
|
49
|
+
"@eslint-react/var": "3.0.0-next.63",
|
|
50
|
+
"@eslint-react/shared": "3.0.0-next.63"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/react": "^19.2.14",
|