function validateNode(node,leftSide){// When the left part of a binary expression is a single expression wrapped in
// parentheses (ex: `(a) + b`), leftToken will be the last token of the expression
// and operatorToken will be the closing parenthesis.
// The leftToken should be the last closing parenthesis, and the operatorToken
// should be the token right after that.
var operatorToken=sourceCode.getTokenAfter(leftSide,astUtils.isNotClosingParenToken);var leftToken=sourceCode.getTokenBefore(operatorToken);var rightToken=sourceCode.getTokenAfter(operatorToken);var operator=operatorToken.value;var operatorStyleOverride=styleOverrides[operator];var style=operatorStyleOverride||globalStyle;var fix=getFixer(operatorToken,style);// if single line
if(astUtils.isTokenOnSameLine(leftToken,operatorToken)&&astUtils.isTokenOnSameLine(operatorToken,rightToken)){// do nothing.
}else if(operatorStyleOverride!=="ignore"&&!astUtils.isTokenOnSameLine(leftToken,operatorToken)&&!astUtils.isTokenOnSameLine(operatorToken,rightToken)){// lone operator
context.report({node:node,loc:{line:operatorToken.loc.end.line,column:operatorToken.loc.end.column},message:"Bad line breaking before and after '{{operator}}'.",data:{operator:operator},fix:fix});}else if(style==="before"&&astUtils.isTokenOnSameLine(leftToken,operatorToken)){context.report({node:node,loc:{line:operatorToken.loc.end.line,column:operatorToken.loc.end.column},message:"'{{operator}}' should be placed at the beginning of the line.",data:{operator:operator},fix:fix});}else if(style==="after"&&astUtils.isTokenOnSameLine(operatorToken,rightToken)){context.report({node:node,loc:{line:operatorToken.loc.end.line,column:operatorToken.loc.end.column},message:"'{{operator}}' should be placed at the end of the line.",data:{operator:operator},fix:fix});}else if(style==="none"){context.report({node:node,loc:{line:operatorToken.loc.end.line,column:operatorToken.loc.end.column},message:"There should be no line break before or after '{{operator}}'.",data:{operator:operator},fix:fix});}}
Checks the operator placement
@param {ASTNode} node The node to check
@param {ASTNode} leftSide The node that comes before the operator in `node`
@private
@returns {void}