async function locateConfigFileToUse({ configFile, cwd }) {
	const configLoader = new ConfigLoader({
		cwd,
		configFile,
	});

	const configFilePath = await configLoader.findConfigFileForPath(
		path.join(cwd, "__placeholder__.js"),
	);

	if (!configFilePath) {
		throw new Error("No ESLint configuration file was found.");
	}

	return {
		configFilePath,
		basePath: configFile ? cwd : path.dirname(configFilePath),
	};
}
Determines which config file to use. This is determined by seeing if an
override config file was passed, and if so, using it; otherwise, as long
as override config file is not explicitly set to `false`, it will search
upwards from the cwd for a file named `eslint.config.js`.

This function is used primarily by the `--inspect-config` option. For now,
we will maintain the existing behavior, which is to search up from the cwd.
@param {ESLintOptions} options The ESLint instance options.
@returns {Promise<{configFilePath:string|undefined;basePath:string}>} Location information for
     the config file.