function check(node) {
			const options = normalizedOptions[node.type];

			if (
				(node.type === "ImportDeclaration" &&
					!node.specifiers.some(
						specifier => specifier.type === "ImportSpecifier",
					)) ||
				(node.type === "ExportNamedDeclaration" &&
					!node.specifiers.some(
						specifier => specifier.type === "ExportSpecifier",
					))
			) {
				return;
			}

			const openBrace = sourceCode.getFirstToken(
				node,
				token => token.value === "{",
			);

			let closeBrace;

			if (node.typeAnnotation) {
				closeBrace = sourceCode.getTokenBefore(node.typeAnnotation);
			} else {
				closeBrace = sourceCode.getLastToken(
					node,
					token => token.value === "}",
				);
			}

			let first = sourceCode.getTokenAfter(openBrace, {
				includeComments: true,
			});
			let last = sourceCode.getTokenBefore(closeBrace, {
				includeComments: true,
			});

			const needsLineBreaks = areLineBreaksRequired(
				node,
				options,
				first,
				last,
			);

			const hasCommentsFirstToken = astUtils.isCommentToken(first);
			const hasCommentsLastToken = astUtils.isCommentToken(last);

			/*
			 * 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({
						messageId: "expectedLinebreakAfterOpeningBrace",
						node,
						loc: openBrace.loc,
						fix(fixer) {
							if (hasCommentsFirstToken) {
								return null;
							}

							return fixer.insertTextAfter(openBrace, "\n");
						},
					});
				}
				if (astUtils.isTokenOnSameLine(last, closeBrace)) {
					context.report({
						messageId: "expectedLinebreakBeforeClosingBrace",
						node,
						loc: closeBrace.loc,
						fix(fixer) {
							if (hasCommentsLastToken) {
								return null;
							}

							return fixer.insertTextBefore(closeBrace, "\n");
						},
					});
				}
			} else {
				const consistent = options.consistent;
				const hasLineBreakBetweenOpenBraceAndFirst =
					!astUtils.isTokenOnSameLine(openBrace, first);
				const hasLineBreakBetweenCloseBraceAndLast =
					!astUtils.isTokenOnSameLine(last, closeBrace);

				if (
					(!consistent && hasLineBreakBetweenOpenBraceAndFirst) ||
					(consistent &&
						hasLineBreakBetweenOpenBraceAndFirst &&
						!hasLineBreakBetweenCloseBraceAndLast)
				) {
					context.report({
						messageId: "unexpectedLinebreakAfterOpeningBrace",
						node,
						loc: openBrace.loc,
						fix(fixer) {
							if (hasCommentsFirstToken) {
								return null;
							}

							return fixer.removeRange([
								openBrace.range[1],
								first.range[0],
							]);
						},
					});
				}
				if (
					(!consistent && hasLineBreakBetweenCloseBraceAndLast) ||
					(consistent &&
						!hasLineBreakBetweenOpenBraceAndFirst &&
						hasLineBreakBetweenCloseBraceAndLast)
				) {
					context.report({
						messageId: "unexpectedLinebreakBeforeClosingBrace",
						node,
						loc: closeBrace.loc,
						fix(fixer) {
							if (hasCommentsLastToken) {
								return null;
							}

							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, ObjectPattern, ImportDeclaration or ExportNamedDeclaration node.
@returns {void}