lib/rules/space-unary-ops.js
function verifyWordHasSpaces(node, firstToken, secondToken, word) {
            if (secondToken.range[0] === firstToken.range[1]) {
                context.report({
                    node,
                    messageId: "wordOperator",
                    data: {
                        word
                    },
                    fix(fixer) {
                        return fixer.insertTextAfter(firstToken, " ");
                    }
                });
            }
        }
function verifyWordHasSpaces(node, firstToken, secondToken, word) {
            if (secondToken.range[0] === firstToken.range[1]) {
                context.report({
                    node,
                    messageId: "wordOperator",
                    data: {
                        word
                    },
                    fix(fixer) {
                        return fixer.insertTextAfter(firstToken, " ");
                    }
                });
            }
        }
function verifyWordHasSpaces ( node , firstToken , secondToken , word ) { if ( secondToken . range [ 0 ] === firstToken . range [ 1 ] ) { context . report ( { node , messageId : "wordOperator" , data : { word } , fix ( fixer ) { return fixer . insertTextAfter ( firstToken , " " ) ; } } ) ; } }
Verify Unary Word Operator has 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 has spaces after the word operator