function continuesPropertyGroup(lastMember, candidate) {
            const groupEndLine = lastMember.loc.start.line,
                candidateStartLine = candidate.loc.start.line;

            if (candidateStartLine - groupEndLine <= 1) {
                return true;
            }

            /*
             * Check that the first comment is adjacent to the end of the group, the
             * last comment is adjacent to the candidate property, and that successive
             * comments are adjacent to each other.
             */
            const leadingComments = sourceCode.getCommentsBefore(candidate);

            if (
                leadingComments.length &&
                leadingComments[0].loc.start.line - groupEndLine <= 1 &&
                candidateStartLine - last(leadingComments).loc.end.line <= 1
            ) {
                for (let i = 1; i < leadingComments.length; i++) {
                    if (leadingComments[i].loc.start.line - leadingComments[i - 1].loc.end.line > 1) {
                        return false;
                    }
                }
                return true;
            }

            return false;
        }
function continuesPropertyGroup(lastMember, candidate) {
            const groupEndLine = lastMember.loc.start.line,
                candidateStartLine = candidate.loc.start.line;

            if (candidateStartLine - groupEndLine <= 1) {
                return true;
            }

            /*
             * Check that the first comment is adjacent to the end of the group, the
             * last comment is adjacent to the candidate property, and that successive
             * comments are adjacent to each other.
             */
            const leadingComments = sourceCode.getCommentsBefore(candidate);

            if (
                leadingComments.length &&
                leadingComments[0].loc.start.line - groupEndLine <= 1 &&
                candidateStartLine - last(leadingComments).loc.end.line <= 1
            ) {
                for (let i = 1; i < leadingComments.length; i++) {
                    if (leadingComments[i].loc.start.line - leadingComments[i - 1].loc.end.line > 1) {
                        return false;
                    }
                }
                return true;
            }

            return false;
        }
function continuesPropertyGroup ( lastMember , candidate ) { const groupEndLine = lastMember . loc . start . line , candidateStartLine = candidate . loc . start . line ; if ( candidateStartLine - groupEndLine <= 1 ) { return true ; } /*
             * Check that the first comment is adjacent to the end of the group, the
             * last comment is adjacent to the candidate property, and that successive
             * comments are adjacent to each other.
             */ const leadingComments = sourceCode . getCommentsBefore ( candidate ) ; if ( leadingComments . length && leadingComments [ 0 ] . loc . start . line - groupEndLine <= 1 && candidateStartLine - last ( leadingComments ) . loc . end . line <= 1 ) { for ( let i = 1 ; i < leadingComments . length ; i ++ ) { if ( leadingComments [ i ] . loc . start . line - leadingComments [ i - 1 ] . loc . end . line > 1 ) { return false ; } } return true ; } return false ; }
Checks whether a property is a member of the property group it follows.
@param {ASTNode} lastMember The last Property known to be in the group.
@param {ASTNode} candidate The next Property that might be in the group.
@returns {boolean} True if the candidate property is part of the group.
Checks whether a property is a member of the property group it follows .
Check if the candidate property is adjacent to the last member of the group