lib/rules/no-trailing-spaces.js
function getCommentLineNumbers(comments) {
            const lines = new Set();

            comments.forEach(comment => {
                for (let i = comment.loc.start.line; i <= comment.loc.end.line; i++) {
                    lines.add(i);
                }
            });

            return lines;
        }
function getCommentLineNumbers(comments) {
            const lines = new Set();

            comments.forEach(comment => {
                for (let i = comment.loc.start.line; i <= comment.loc.end.line; i++) {
                    lines.add(i);
                }
            });

            return lines;
        }
function getCommentLineNumbers ( comments ) { const lines = new Set ( ) ; comments . forEach ( comment => { for ( let i = comment . loc . start . line ; i <= comment . loc . end . line ; i ++ ) { lines . add ( i ) ; } } ) ; return lines ; }
Given a list of comment nodes, return the line numbers for those comments.
@param {Array} comments An array of comment nodes.
@returns {number[]} An array of line numbers containing comments.
Given a list of comment nodes return the line numbers for those comments .