@eslint-react/jsx 1.30.1-next.1 → 1.30.2-beta.1
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/LICENSE +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +4 -4
package/LICENSE
CHANGED
package/dist/index.js
CHANGED
|
@@ -70,7 +70,7 @@ function getAttribute(name, attributes, initialScope) {
|
|
|
70
70
|
switch (attr.argument.type) {
|
|
71
71
|
case types.AST_NODE_TYPES.Identifier: {
|
|
72
72
|
const variable = VAR__namespace.findVariable(attr.argument.name, initialScope);
|
|
73
|
-
const variableNode = VAR__namespace.
|
|
73
|
+
const variableNode = VAR__namespace.getVariableInitNode(variable, 0);
|
|
74
74
|
if (variableNode?.type === types.AST_NODE_TYPES.ObjectExpression) {
|
|
75
75
|
return VAR__namespace.findPropertyInProperties(name, variableNode.properties, initialScope) != null;
|
|
76
76
|
}
|
|
@@ -237,7 +237,7 @@ function isJSXValue(node, jsxCtx, hint = DEFAULT_JSX_VALUE_HINT) {
|
|
|
237
237
|
return true;
|
|
238
238
|
}
|
|
239
239
|
const variable = VAR__namespace.findVariable(name, jsxCtx.getScope(node));
|
|
240
|
-
const variableNode = variable && VAR__namespace.
|
|
240
|
+
const variableNode = variable && VAR__namespace.getVariableInitNode(variable, 0);
|
|
241
241
|
return !!variableNode && isJSXValue(variableNode, jsxCtx, hint);
|
|
242
242
|
}
|
|
243
243
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -47,7 +47,7 @@ function getAttribute(name, attributes, initialScope) {
|
|
|
47
47
|
switch (attr.argument.type) {
|
|
48
48
|
case AST_NODE_TYPES.Identifier: {
|
|
49
49
|
const variable = VAR.findVariable(attr.argument.name, initialScope);
|
|
50
|
-
const variableNode = VAR.
|
|
50
|
+
const variableNode = VAR.getVariableInitNode(variable, 0);
|
|
51
51
|
if (variableNode?.type === AST_NODE_TYPES.ObjectExpression) {
|
|
52
52
|
return VAR.findPropertyInProperties(name, variableNode.properties, initialScope) != null;
|
|
53
53
|
}
|
|
@@ -214,7 +214,7 @@ function isJSXValue(node, jsxCtx, hint = DEFAULT_JSX_VALUE_HINT) {
|
|
|
214
214
|
return true;
|
|
215
215
|
}
|
|
216
216
|
const variable = VAR.findVariable(name, jsxCtx.getScope(node));
|
|
217
|
-
const variableNode = variable && VAR.
|
|
217
|
+
const variableNode = variable && VAR.getVariableInitNode(variable, 0);
|
|
218
218
|
return !!variableNode && isJSXValue(variableNode, jsxCtx, hint);
|
|
219
219
|
}
|
|
220
220
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/jsx",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.2-beta.1",
|
|
4
4
|
"description": "ESLint React's TSESTree AST utility module for static analysis of JSX.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"@typescript-eslint/types": "^8.26.0",
|
|
40
40
|
"@typescript-eslint/utils": "^8.26.0",
|
|
41
41
|
"ts-pattern": "^5.6.2",
|
|
42
|
-
"@eslint-react/ast": "1.30.
|
|
43
|
-
"@eslint-react/eff": "1.30.
|
|
44
|
-
"@eslint-react/var": "1.30.
|
|
42
|
+
"@eslint-react/ast": "1.30.2-beta.1",
|
|
43
|
+
"@eslint-react/eff": "1.30.2-beta.1",
|
|
44
|
+
"@eslint-react/var": "1.30.2-beta.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"tsup": "^8.4.0",
|