lib/rules/space-infix-ops.js
function getFirstNonSpacedToken(left, right, op) {
            const operator = sourceCode.getFirstTokenBetween(left, right, token => token.value === op);
            const prev = sourceCode.getTokenBefore(operator);
            const next = sourceCode.getTokenAfter(operator);

            if (!sourceCode.isSpaceBetweenTokens(prev, operator) || !sourceCode.isSpaceBetweenTokens(operator, next)) {
                return operator;
            }

            return null;
        }
function getFirstNonSpacedToken(left, right, op) {
            const operator = sourceCode.getFirstTokenBetween(left, right, token => token.value === op);
            const prev = sourceCode.getTokenBefore(operator);
            const next = sourceCode.getTokenAfter(operator);

            if (!sourceCode.isSpaceBetweenTokens(prev, operator) || !sourceCode.isSpaceBetweenTokens(operator, next)) {
                return operator;
            }

            return null;
        }
function getFirstNonSpacedToken ( left , right , op ) { const operator = sourceCode . getFirstTokenBetween ( left , right , token => token . value === op ) ; const prev = sourceCode . getTokenBefore ( operator ) ; const next = sourceCode . getTokenAfter ( operator ) ; if ( ! sourceCode . isSpaceBetweenTokens ( prev , operator ) || ! sourceCode . isSpaceBetweenTokens ( operator , next ) ) { return operator ; } return null ; }
Returns the first token which violates the rule
@param {ASTNode} left - The left node of the main node
@param {ASTNode} right - The right node of the main node
@param {string} op - The operator of the main node
@returns {Object} The violator token or null
@private
Returns the first token which violates the rule