async function loadESLint({ useFlatConfig } = {}) {
	/*
	 * Note: The v8.x version of this function also accepted a `cwd` option, but
	 * it is not used in this implementation so we silently ignore it.
	 */

	const shouldESLintUseFlatConfig =
		useFlatConfig ?? (await shouldUseFlatConfig());

	return shouldESLintUseFlatConfig ? ESLint : LegacyESLint;
}
Loads the correct ESLint constructor given the options.
@param {Object} [options] The options object
@param {boolean} [options.useFlatConfig] Whether or not to use a flat config
@returns {Promise<ESLint|LegacyESLint>} The ESLint constructor