@blumintinc/eslint-plugin-blumint 0.1.16 → 0.1.17
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/lib/index.js +1 -1
- package/lib/utils/ASTHelpers.js +3 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
package/lib/utils/ASTHelpers.js
CHANGED
|
@@ -143,13 +143,14 @@ class ASTHelpers {
|
|
|
143
143
|
return false;
|
|
144
144
|
}
|
|
145
145
|
static returnsJSX(node) {
|
|
146
|
-
if (node.type === 'JSXElement') {
|
|
146
|
+
if (node.type === 'JSXElement' || node.type === 'JSXFragment') {
|
|
147
147
|
return true;
|
|
148
148
|
}
|
|
149
149
|
if (node.type === 'BlockStatement') {
|
|
150
150
|
for (const statement of node.body) {
|
|
151
151
|
if (statement.type === 'ReturnStatement' &&
|
|
152
|
-
statement.argument?.type === 'JSXElement'
|
|
152
|
+
(statement.argument?.type === 'JSXElement' ||
|
|
153
|
+
statement.argument?.type === 'JSXFragment')) {
|
|
153
154
|
return true;
|
|
154
155
|
}
|
|
155
156
|
}
|