lib/rules/object-curly-newline.js
function areLineBreaksRequired(node, options, first, last) {
    let objectProperties;

    if (node.type === "ObjectExpression" || node.type === "ObjectPattern") {
        objectProperties = node.properties;
    } else {

        // is ImportDeclaration or ExportNamedDeclaration
        objectProperties = node.specifiers
            .filter(s => s.type === "ImportSpecifier" || s.type === "ExportSpecifier");
    }

    return objectProperties.length >= options.minProperties ||
        (
            options.multiline &&
            objectProperties.length > 0 &&
            first.loc.start.line !== last.loc.end.line
        );
}
function areLineBreaksRequired(node, options, first, last) {
    let objectProperties;

    if (node.type === "ObjectExpression" || node.type === "ObjectPattern") {
        objectProperties = node.properties;
    } else {

        // is ImportDeclaration or ExportNamedDeclaration
        objectProperties = node.specifiers
            .filter(s => s.type === "ImportSpecifier" || s.type === "ExportSpecifier");
    }

    return objectProperties.length >= options.minProperties ||
        (
            options.multiline &&
            objectProperties.length > 0 &&
            first.loc.start.line !== last.loc.end.line
        );
}
function areLineBreaksRequired ( node , options , first , last ) { let objectProperties ; if ( node . type === "ObjectExpression" || node . type === "ObjectPattern" ) { objectProperties = node . properties ; } else { // is ImportDeclaration or ExportNamedDeclaration objectProperties = node . specifiers . filter ( s => s . type === "ImportSpecifier" || s . type === "ExportSpecifier" ) ; } return objectProperties . length >= options . minProperties || ( options . multiline && objectProperties . length > 0 && first . loc . start . line !== last . loc . end . line ) ; }
Determines if ObjectExpression, ObjectPattern, ImportDeclaration or ExportNamedDeclaration
node needs to be checked for missing line breaks

@param {ASTNode} node - Node under inspection
@param {Object} options - option specific to node type
@param {Token} first - First object property
@param {Token} last - Last object property
@returns {boolean} `true` if node needs to be checked for missing line breaks
Determines if ObjectExpression ObjectPattern ImportDeclaration or ExportNamedDeclaration node needs to be checked for missing line breaks