Skip to content

Commit

Permalink
Add JSXText support to jsx-no-literals
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickcr committed May 28, 2018
1 parent 0a6cb51 commit bd6caf0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/rules/jsx-no-literals.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ module.exports = {
}
},

JSXText: function(node) {
if (getValidation(node)) {
reportLiteralNode(node);
}
},

TemplateLiteral: function(node) {
const parent = getParentIgnoringBinaryExpressions(node);
if (isNoStrings && parent.type === 'JSXExpressionContainer') {
Expand Down

0 comments on commit bd6caf0

Please sign in to comment.