lib/rules/no-extra-parens.js
function requiresLeadingSpace(node) {
            const leftParenToken = sourceCode.getTokenBefore(node);
            const tokenBeforeLeftParen = sourceCode.getTokenBefore(node, 1);
            const firstToken = sourceCode.getFirstToken(node);

            return tokenBeforeLeftParen &&
                tokenBeforeLeftParen.range[1] === leftParenToken.range[0] &&
                leftParenToken.range[1] === firstToken.range[0] &&
                !astUtils.canTokensBeAdjacent(tokenBeforeLeftParen, firstToken);
        }
function requiresLeadingSpace(node) {
            const leftParenToken = sourceCode.getTokenBefore(node);
            const tokenBeforeLeftParen = sourceCode.getTokenBefore(node, 1);
            const firstToken = sourceCode.getFirstToken(node);

            return tokenBeforeLeftParen &&
                tokenBeforeLeftParen.range[1] === leftParenToken.range[0] &&
                leftParenToken.range[1] === firstToken.range[0] &&
                !astUtils.canTokensBeAdjacent(tokenBeforeLeftParen, firstToken);
        }
function requiresLeadingSpace ( node ) { const leftParenToken = sourceCode . getTokenBefore ( node ) ; const tokenBeforeLeftParen = sourceCode . getTokenBefore ( node , 1 ) ; const firstToken = sourceCode . getFirstToken ( node ) ; return tokenBeforeLeftParen && tokenBeforeLeftParen . range [ 1 ] === leftParenToken . range [ 0 ] && leftParenToken . range [ 1 ] === firstToken . range [ 0 ] && ! astUtils . canTokensBeAdjacent ( tokenBeforeLeftParen , firstToken ) ; }
Determines whether a node should be preceded by an additional space when removing parens
@param {ASTNode} node node to evaluate; must be surrounded by parentheses
@returns {boolean} `true` if a space should be inserted before the node
@private
Determines whether a node should be preceded by an additional space when removing parens