async loadConfigArrayForDirectory(dirPath) {
		assertValidFilePath(dirPath);

		debug(`Calculating config for directory ${dirPath}`);

		const absoluteDirPath = path.resolve(
			this.#options.cwd,
			path.dirname(dirPath),
		);
		const { configFilePath, basePath } =
			await this.#locateConfigFileToUse(absoluteDirPath);

		debug(`Using config file ${configFilePath} and base path ${basePath}`);
		return this.#calculateConfigArray(configFilePath, basePath);
	}
Returns a configuration object for the given directory based on the CLI options.
This is the same logic used by the ESLint CLI executable to determine
configuration for each file it processes.
@param {string} dirPath The path of the directory to retrieve config for.
@returns {Promise<FlatConfigArray>} A configuration object for the directory.