function displayReport(node){context.report({node:node,message:"Unnecessary 'else' after 'return'.",fix:function fix(fixer){var sourceCode=context.getSourceCode();var startToken=sourceCode.getFirstToken(node);var elseToken=sourceCode.getTokenBefore(startToken);var source=sourceCode.getText(node);var lastIfToken=sourceCode.getTokenBefore(elseToken);var fixedSource=void 0,firstTokenOfElseBlock=void 0;if(startToken.type==="Punctuator"&&startToken.value==="{"){firstTokenOfElseBlock=sourceCode.getTokenAfter(startToken);}else{firstTokenOfElseBlock=startToken;}// If the if block does not have curly braces and does not end in a semicolon
// and the else block starts with (, [, /, +, ` or -, then it is not
// safe to remove the else keyword, because ASI will not add a semicolon
// after the if block
var ifBlockMaybeUnsafe=node.parent.consequent.type!=="BlockStatement"&&lastIfToken.value!==";";var elseBlockUnsafe=/^[([/+`-]/.test(firstTokenOfElseBlock.value);if(ifBlockMaybeUnsafe&&elseBlockUnsafe){return null;}var endToken=sourceCode.getLastToken(node);var lastTokenOfElseBlock=sourceCode.getTokenBefore(endToken);if(lastTokenOfElseBlock.value!==";"){var nextToken=sourceCode.getTokenAfter(endToken);var nextTokenUnsafe=nextToken&&/^[([/+`-]/.test(nextToken.value);var nextTokenOnSameLine=nextToken&&nextToken.loc.start.line===lastTokenOfElseBlock.loc.start.line;// If the else block contents does not end in a semicolon,
// and the else block starts with (, [, /, +, ` or -, then it is not
// safe to remove the else block, because ASI will not add a semicolon
// after the remaining else block contents
if(nextTokenUnsafe||nextTokenOnSameLine&&nextToken.value!=="}"){return null;}}if(startToken.type==="Punctuator"&&startToken.value==="{"){fixedSource=source.slice(1,-1);}else{fixedSource=source;}// Extend the replacement range to include the entire
// function to avoid conflicting with no-useless-return.
// https://github.com/eslint/eslint/issues/8026
return new FixTracker(fixer,sourceCode).retainEnclosingFunction(node).replaceTextRange([elseToken.start,node.end],fixedSource);}});}
Display the context report if rule is violated

@param {Node} node The 'else' node
@returns {void}