Skip to content

Commit bd6caf0

Browse files
committed
Add JSXText support to jsx-no-literals
1 parent 0a6cb51 commit bd6caf0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/rules/jsx-no-literals.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ module.exports = {
7777
}
7878
},
7979

80+
JSXText: function(node) {
81+
if (getValidation(node)) {
82+
reportLiteralNode(node);
83+
}
84+
},
85+
8086
TemplateLiteral: function(node) {
8187
const parent = getParentIgnoringBinaryExpressions(node);
8288
if (isNoStrings && parent.type === 'JSXExpressionContainer') {

0 commit comments

Comments
 (0)