function checkLastReturnStatementLineIndent(node,firstLineIndent){// in case if return statement ends with ');' we have traverse back to ')'
// otherwise we'll measure indent for ';' and replace ')'
var lastToken=sourceCode.getLastToken(node,astUtils.isClosingParenToken);var textBeforeClosingParenthesis=sourceCode.getText(lastToken,lastToken.loc.start.column).slice(0,-1);if(textBeforeClosingParenthesis.trim()){// There are tokens before the closing paren, don't report this case
return;}var endIndent=getNodeIndent(lastToken,true);if(endIndent.goodChar!==firstLineIndent){report(node,firstLineIndent,endIndent.space,endIndent.tab,{line:lastToken.loc.start.line,column:lastToken.loc.start.column},true);}}
Check last node line indent this detects, that block closed correctly
This function for more complicated return statement case, where closing parenthesis may be followed by ';'
@param {ASTNode} node Node to examine
@param {int} firstLineIndent first line needed indent
@returns {void}