Skip to content

Commit

Permalink
Fix indent handling for closing parenthese to fix #618
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbuck committed Jun 3, 2016
1 parent d0e4879 commit af8bb41
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/rules/jsx-indent.js
Expand Up @@ -159,6 +159,18 @@ module.exports = function(context) {
}
var peerElementIndent = getNodeIndent(node.parent.openingElement);
checkNodesIndent(node, peerElementIndent);
},
ReturnStatement: function(node) {
if (!node.parent) {
return;
}

var openingIndent = getNodeIndent(node);
var closingIndent = getNodeIndent(node, true);

if (closingIndent !== openingIndent) {
report(node, openingIndent, closingIndent);
}
}
};

Expand Down

0 comments on commit af8bb41

Please sign in to comment.