lib/rules/spaced-comment.js
function reportEnd(node, message, match) {
            context.report({
                node,
                fix(fixer) {
                    if (requireSpace) {
                        return fixer.insertTextAfterRange([node.range[0], node.range[1] - 2], " ");
                    }
                    const end = node.range[1] - 2,
                        start = end - match[0].length;

                    return fixer.replaceTextRange([start, end], "");

                },
                message
            });
        }
function reportEnd(node, message, match) {
            context.report({
                node,
                fix(fixer) {
                    if (requireSpace) {
                        return fixer.insertTextAfterRange([node.range[0], node.range[1] - 2], " ");
                    }
                    const end = node.range[1] - 2,
                        start = end - match[0].length;

                    return fixer.replaceTextRange([start, end], "");

                },
                message
            });
        }
function reportEnd ( node , message , match ) { context . report ( { node , fix ( fixer ) { if ( requireSpace ) { return fixer . insertTextAfterRange ( [ node . range [ 0 ] , node . range [ 1 ] - 2 ] , " " ) ; } const end = node . range [ 1 ] - 2 , start = end - match [ 0 ] . length ; return fixer . replaceTextRange ( [ start , end ] , "" ) ; } , message } ) ; }
Reports an ending spacing error with an appropriate message.
@param {ASTNode} node - A comment node to check.
@param {string} message - An error message to report.
@param {string} match - An array of the matched whitespace characters.
@returns {void}
Reports an ending spacing error with an appropriate message .