static async locateConfigFileToUse({
		useConfigFile,
		cwd,
		fromDirectory = cwd,
	}) {
		// determine where to load config file from
		let configFilePath;
		let basePath = cwd;

		if (typeof useConfigFile === "string") {
			debug(`Override config file path is ${useConfigFile}`);
			configFilePath = path.resolve(cwd, useConfigFile);
			basePath = cwd;
		} else if (useConfigFile !== false) {
			debug("Searching for eslint.config.js");
			configFilePath = await findUp(FLAT_CONFIG_FILENAMES, {
				cwd: fromDirectory,
			});

			if (configFilePath) {
				basePath = path.dirname(configFilePath);
			}
		}

		return {
			configFilePath,
			basePath,
		};
	}
Determines which config file to use. This is determined by seeing if an
override config file was specified, and if so, using it; otherwise, as long
as override config file is not explicitly set to `false`, it will search
upwards from `fromDirectory` for a file named `eslint.config.js`.
This method is exposed internally for testing purposes.
@param {Object} [options] the options object
@param {string|false|undefined} options.useConfigFile The path to the config file to use.
@param {string} options.cwd Path to a directory that should be considered as the current working directory.
@param {string} [options.fromDirectory] The directory from which to start searching. Defaults to `cwd`.
@returns {Promise<{configFilePath:string|undefined,basePath:string}>} Location information for
     the config file.