code: function hasLeadingSpace(token) {
              const tokenBefore = sourceCode.getTokenBefore(token);
  
              return tokenBefore && astUtils.isTokenOnSameLine(tokenBefore, token) && sourceCode.isSpaceBetweenTokens(tokenBefore, token);
          }
docs: 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.