lib/rules/max-attributes-per-line.js
function groupAttrsByLine(attributes) {
            const propsPerLine = [[attributes[0]]]

            attributes.reduce((previous, current) => {
                if (previous.loc.end.line === current.loc.start.line) {
                    propsPerLine[propsPerLine.length - 1].push(current)
                } else {
                    propsPerLine.push([current])
                }
                return current
            })

            return propsPerLine
        }
function groupAttrsByLine(attributes) {
            const propsPerLine = [[attributes[0]]]

            attributes.reduce((previous, current) => {
                if (previous.loc.end.line === current.loc.start.line) {
                    propsPerLine[propsPerLine.length - 1].push(current)
                } else {
                    propsPerLine.push([current])
                }
                return current
            })

            return propsPerLine
        }
function groupAttrsByLine ( attributes ) { const propsPerLine = [ [ attributes [ 0 ] ] ] attributes . reduce ( ( previous , current ) => { if ( previous . loc . end . line === current . loc . start . line ) { propsPerLine [ propsPerLine . length - 1 ] . push ( current ) } else { propsPerLine . push ( [ current ] ) } return current } ) return propsPerLine }
Grouping attribute lists line by line
@param  {Array} attributes The attribute nodes
@returns {Array} The group attribute nodes
Grouping attribute lists line by line