lib/rules/semi-spacing.js
function hasLeadingSpace(token) {
            const tokenBefore = sourceCode.getTokenBefore(token);

            return tokenBefore && astUtils.isTokenOnSameLine(tokenBefore, token) && sourceCode.isSpaceBetweenTokens(tokenBefore, token);
        }
function hasLeadingSpace(token) {
            const tokenBefore = sourceCode.getTokenBefore(token);

            return tokenBefore && astUtils.isTokenOnSameLine(tokenBefore, token) && sourceCode.isSpaceBetweenTokens(tokenBefore, token);
        }
function hasLeadingSpace ( token ) { const tokenBefore = sourceCode . getTokenBefore ( token ) ; return tokenBefore && astUtils . isTokenOnSameLine ( tokenBefore , token ) && sourceCode . isSpaceBetweenTokens ( tokenBefore , token ) ; }
Checks if a given token has leading whitespace.
@param {Object} token The token to check.
@returns {boolean} True if the given token has leading space, false if not.
Checks if a given token has leading whitespace .