function check(node) {
			const elements = node.elements;
			const normalizedOptions = normalizeOptions(context.options[0]);
			const options = normalizedOptions[node.type];
			const openBracket = sourceCode.getFirstToken(node);
			const closeBracket = sourceCode.getLastToken(node);
			const firstIncComment = sourceCode.getTokenAfter(openBracket, {
				includeComments: true,
			});
			const lastIncComment = sourceCode.getTokenBefore(closeBracket, {
				includeComments: true,
			});
			const first = sourceCode.getTokenAfter(openBracket);
			const last = sourceCode.getTokenBefore(closeBracket);

			const needsLinebreaks =
				elements.length >= options.minItems ||
				(options.multiline &&
					elements.length > 0 &&
					firstIncComment.loc.start.line !==
						lastIncComment.loc.end.line) ||
				(elements.length === 0 &&
					firstIncComment.type === "Block" &&
					firstIncComment.loc.start.line !==
						lastIncComment.loc.end.line &&
					firstIncComment === lastIncComment) ||
				(options.consistent &&
					openBracket.loc.end.line !== first.loc.start.line);

			/*
			 * Use tokens or comments to check multiline or not.
			 * But use only tokens to check whether linebreaks are needed.
			 * This allows:
			 *     var arr = [ // eslint-disable-line foo
			 *         'a'
			 *     ]
			 */

			if (needsLinebreaks) {
				if (astUtils.isTokenOnSameLine(openBracket, first)) {
					reportRequiredBeginningLinebreak(node, openBracket);
				}
				if (astUtils.isTokenOnSameLine(last, closeBracket)) {
					reportRequiredEndingLinebreak(node, closeBracket);
				}
			} else {
				if (!astUtils.isTokenOnSameLine(openBracket, first)) {
					reportNoBeginningLinebreak(node, openBracket);
				}
				if (!astUtils.isTokenOnSameLine(last, closeBracket)) {
					reportNoEndingLinebreak(node, closeBracket);
				}
			}
		}
Reports a given node if it violated this rule.
@param {ASTNode} node A node to check. This is an ArrayExpression node or an ArrayPattern node.
@returns {void}