function validateParser(parser) {
	if (
		!parser ||
		typeof parser !== "object" ||
		(typeof parser.parse !== "function" &&
			typeof parser.parseForESLint !== "function")
	) {
		throw new TypeError(
			'Key "parser": Expected object with parse() or parseForESLint() method.',
		);
	}
}
Validates the parser property.
@param {Object} parser The value to check.
@returns {void}
@throws {TypeError} If the value is invalid.