function reportNoEndingSpace(node, token) {
      report(context, messages.noSpaceBefore, 'noSpaceBefore', {
        node,
        loc: token.loc.start,
        data: {
          token: token.value,
        },
        fix(fixer) {
          const sourceCode = getSourceCode(context);
          const previousToken = sourceCode.getTokenBefore(token);
          let previousComment;

          // eslint >=4.x
          if (sourceCode.getCommentsBefore) {
            previousComment = sourceCode.getCommentsBefore(token);
          // eslint 3.x
          } else {
            const potentialComment = sourceCode.getTokenBefore(token, { includeComments: true });
            previousComment = previousToken === potentialComment ? [] : [potentialComment];
          }

          // Take comments into consideration to narrow the fix range to what is actually affected. (See #1414)
          if (previousComment.length > 0) {
            return fixByTrimmingWhitespace(fixer, Math.max(previousToken.range[1], previousComment[0].range[1]), token.range[0], 'end');
          }

          return fixByTrimmingWhitespace(fixer, previousToken.range[1], token.range[0], 'end');
        },
      });
    }
Reports that there shouldn't be a space before the last token
@param {ASTNode} node - The node to report in the event of an error.
@param {Token} token - The token to use for the report.
@returns {void}