function check(node){var options=normalizedOptions[node.type];var openBrace=sourceCode.getFirstToken(node);var closeBrace=sourceCode.getLastToken(node);var first=sourceCode.getTokenAfter(openBrace,{includeComments:true});var last=sourceCode.getTokenBefore(closeBrace,{includeComments:true});var needsLinebreaks=node.properties.length>=options.minProperties||options.multiline&&node.properties.length>0&&first.loc.start.line!==last.loc.end.line;/*
             * Use tokens or comments to check multiline or not.
             * But use only tokens to check whether line breaks are needed.
             * This allows:
             *     var obj = { // eslint-disable-line foo
             *         a: 1
             *     }
             */first=sourceCode.getTokenAfter(openBrace);last=sourceCode.getTokenBefore(closeBrace);if(needsLinebreaks){if(astUtils.isTokenOnSameLine(openBrace,first)){context.report({message:"Expected a line break after this opening brace.",node:node,loc:openBrace.loc.start,fix:function fix(fixer){return fixer.insertTextAfter(openBrace,"\n");}});}if(astUtils.isTokenOnSameLine(last,closeBrace)){context.report({message:"Expected a line break before this closing brace.",node:node,loc:closeBrace.loc.start,fix:function fix(fixer){return fixer.insertTextBefore(closeBrace,"\n");}});}}else{if(!astUtils.isTokenOnSameLine(openBrace,first)){context.report({message:"Unexpected line break after this opening brace.",node:node,loc:openBrace.loc.start,fix:function fix(fixer){return fixer.removeRange([openBrace.range[1],first.range[0]]);}});}if(!astUtils.isTokenOnSameLine(last,closeBrace)){context.report({message:"Unexpected line break before this closing brace.",node:node,loc:closeBrace.loc.start,fix:function fix(fixer){return fixer.removeRange([last.range[1],closeBrace.range[0]]);}});}}}
Reports a given node if it violated this rule.

@param {ASTNode} node - A node to check. This is an ObjectExpression node or an ObjectPattern node.
@param {{multiline: boolean, minProperties: number}} options - An option object.
@returns {void}