We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 632941c commit 29c248dCopy full SHA for 29c248d
lib/rules/self-closing-comp.js
@@ -52,7 +52,7 @@ module.exports = {
52
const childrens = node.parent.children;
53
if (
54
!childrens.length ||
55
- (childrens.length === 1 && childrens[0].type === 'Literal' && !childrens[0].value.replace(/(?!\xA0)\s/g, ''))
+ (childrens.length === 1 && (childrens[0].type === 'Literal' || childrens[0].type === 'JSXText') && !childrens[0].value.replace(/(?!\xA0)\s/g, ''))
56
) {
57
return false;
58
}
0 commit comments