Skip to content

Commit 0a6cb51

Browse files
committed
Add JSXText support to jsx-indent
1 parent c734901 commit 0a6cb51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules/jsx-indent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ module.exports = {
214214
// Use the parent in a list or an array
215215
if (prevToken.type === 'JSXText' || prevToken.type === 'Punctuator' && prevToken.value === ',') {
216216
prevToken = sourceCode.getNodeByRangeIndex(prevToken.range[0]);
217-
prevToken = prevToken.type === 'Literal' ? prevToken.parent : prevToken;
217+
prevToken = prevToken.type === 'Literal' || prevToken.type === 'JSXText' ? prevToken.parent : prevToken;
218218
// Use the first non-punctuator token in a conditional expression
219219
} else if (prevToken.type === 'Punctuator' && prevToken.value === ':') {
220220
do {

0 commit comments

Comments
 (0)