lib/rules/space-unary-ops.js
function verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word) {
            if (astUtils.canTokensBeAdjacent(firstToken, secondToken)) {
                if (secondToken.range[0] > firstToken.range[1]) {
                    context.report({
                        node,
                        messageId: "unexpectedAfterWord",
                        data: {
                            word
                        },
                        fix(fixer) {
                            return fixer.removeRange([firstToken.range[1], secondToken.range[0]]);
                        }
                    });
                }
            }
        }
function verifyWordDoesntHaveSpaces(node, firstToken, secondToken, word) {
            if (astUtils.canTokensBeAdjacent(firstToken, secondToken)) {
                if (secondToken.range[0] > firstToken.range[1]) {
                    context.report({
                        node,
                        messageId: "unexpectedAfterWord",
                        data: {
                            word
                        },
                        fix(fixer) {
                            return fixer.removeRange([firstToken.range[1], secondToken.range[0]]);
                        }
                    });
                }
            }
        }
function verifyWordDoesntHaveSpaces ( node , firstToken , secondToken , word ) { if ( astUtils . canTokensBeAdjacent ( firstToken , secondToken ) ) { if ( secondToken . range [ 0 ] > firstToken . range [ 1 ] ) { context . report ( { node , messageId : "unexpectedAfterWord" , data : { word } , fix ( fixer ) { return fixer . removeRange ( [ firstToken . range [ 1 ] , secondToken . range [ 0 ] ] ) ; } } ) ; } } }
Verify Unary Word Operator doesn't have spaces after the word operator
@param {ASTnode} node AST node
@param {Object} firstToken first token from the AST node
@param {Object} secondToken second token from the AST node
@param {string} word The word to be used for reporting
@returns {void}
Verify Unary Word Operator doesn t have spaces after the word operator