function validateBraceSpacing(node, first, second, penultimate, last) {
			if (astUtils.isTokenOnSameLine(first, second)) {
				const firstSpaced = sourceCode.isSpaceBetweenTokens(
					first,
					second,
				);

				if (options.spaced && !firstSpaced) {
					reportRequiredBeginningSpace(node, first);
				}
				if (!options.spaced && firstSpaced && second.type !== "Line") {
					reportNoBeginningSpace(node, first);
				}
			}

			if (astUtils.isTokenOnSameLine(penultimate, last)) {
				const shouldCheckPenultimate =
					(options.arraysInObjectsException &&
						astUtils.isClosingBracketToken(penultimate)) ||
					(options.objectsInObjectsException &&
						astUtils.isClosingBraceToken(penultimate));
				const penultimateType =
					shouldCheckPenultimate &&
					sourceCode.getNodeByRangeIndex(penultimate.range[0]).type;

				const closingCurlyBraceMustBeSpaced =
					(options.arraysInObjectsException &&
						penultimateType === "ArrayExpression") ||
					(options.objectsInObjectsException &&
						(penultimateType === "ObjectExpression" ||
							penultimateType === "ObjectPattern"))
						? !options.spaced
						: options.spaced;

				const lastSpaced = sourceCode.isSpaceBetweenTokens(
					penultimate,
					last,
				);

				if (closingCurlyBraceMustBeSpaced && !lastSpaced) {
					reportRequiredEndingSpace(node, last);
				}
				if (!closingCurlyBraceMustBeSpaced && lastSpaced) {
					reportNoEndingSpace(node, last);
				}
			}
		}
Determines if spacing in curly braces is valid.
@param {ASTNode} node The AST node to check.
@param {Token} first The first token to check (should be the opening brace)
@param {Token} second The second token to check (should be first after the opening brace)
@param {Token} penultimate The penultimate token to check (should be last before closing brace)
@param {Token} last The last token to check (should be closing brace)
@returns {void}