@eslint-react/jsx 5.5.6-next.0 → 5.6.0-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/dist/index.js +6 -4
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -691,13 +691,15 @@ function isJsxLike(context, node, hint = DEFAULT_JSX_DETECTION_HINT) {
|
|
|
691
691
|
return consequentIsJsx || alternateIsJsx;
|
|
692
692
|
}
|
|
693
693
|
case AST_NODE_TYPES.SequenceExpression: return isJsxLike(context, node.expressions.at(-1) ?? null, hint);
|
|
694
|
-
case AST_NODE_TYPES.CallExpression:
|
|
694
|
+
case AST_NODE_TYPES.CallExpression: {
|
|
695
695
|
if (hint & JsxDetectionHint.DoNotIncludeJsxWithCreateElementValue) return false;
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
case AST_NODE_TYPES.
|
|
696
|
+
const callee = Extract.unwrap(node.callee);
|
|
697
|
+
switch (callee.type) {
|
|
698
|
+
case AST_NODE_TYPES.Identifier: return callee.name === "createElement";
|
|
699
|
+
case AST_NODE_TYPES.MemberExpression: return callee.property.type === AST_NODE_TYPES.Identifier && callee.property.name === "createElement";
|
|
699
700
|
}
|
|
700
701
|
return false;
|
|
702
|
+
}
|
|
701
703
|
case AST_NODE_TYPES.Identifier:
|
|
702
704
|
if (node.name === "undefined") return !(hint & JsxDetectionHint.DoNotIncludeJsxWithUndefinedValue);
|
|
703
705
|
if (Check.isJSXTagNameExpression(node)) return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/jsx",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.0-beta.1",
|
|
4
4
|
"description": "ESLint React's TSESTree JSX utility module for static analysis of JSX patterns.",
|
|
5
5
|
"homepage": "https://github.com/Rel1cx/eslint-react",
|
|
6
6
|
"bugs": {
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
"@typescript-eslint/types": "^8.59.1",
|
|
33
33
|
"@typescript-eslint/utils": "^8.59.1",
|
|
34
34
|
"ts-pattern": "^5.9.0",
|
|
35
|
-
"@eslint-react/ast": "5.
|
|
36
|
-
"@eslint-react/
|
|
37
|
-
"@eslint-react/shared": "5.
|
|
38
|
-
"@eslint-react/
|
|
35
|
+
"@eslint-react/ast": "5.6.0-beta.1",
|
|
36
|
+
"@eslint-react/eslint": "5.6.0-beta.1",
|
|
37
|
+
"@eslint-react/shared": "5.6.0-beta.1",
|
|
38
|
+
"@eslint-react/var": "5.6.0-beta.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"eslint": "^10.2.1",
|
|
42
42
|
"tsdown": "^0.21.10",
|
|
43
43
|
"typescript": "^6.0.3",
|
|
44
|
-
"@local/
|
|
45
|
-
"@local/
|
|
44
|
+
"@local/configs": "0.0.0",
|
|
45
|
+
"@local/eff": "3.0.0-beta.72"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"eslint": "^10.2.1",
|