code: function hasTrailingSpace(token) {
              const tokenAfter = sourceCode.getTokenAfter(token);
  
              return tokenAfter && astUtils.isTokenOnSameLine(token, tokenAfter) && sourceCode.isSpaceBetweenTokens(token, tokenAfter);
          }
docs: Checks if a given token has trailing whitespace.
  @param {Object} token The token to check.
  @returns {boolean} True if the given token has trailing space, false if not.