getCachedConfigArrayForPath(fileOrDirPath) {
		assertValidFilePath(fileOrDirPath);

		debug(`Looking up cached config for ${fileOrDirPath}`);

		const absoluteDirPath = path.resolve(this.#options.cwd, fileOrDirPath);

		if (!this.#configFilePaths.has(absoluteDirPath)) {
			throw new Error(`Could not find config file for ${fileOrDirPath}`);
		}

		const configFilePathInfo = this.#configFilePaths.get(absoluteDirPath);

		if (typeof configFilePathInfo.then === "function") {
			throw new Error(
				`Config file path for ${fileOrDirPath} has not yet been calculated or an error occurred during the calculation`,
			);
		}

		const { configFilePath } = configFilePathInfo;

		const configArray = this.#configArrays.get(configFilePath);

		if (!configArray || typeof configArray.then === "function") {
			throw new Error(
				`Config array for ${fileOrDirPath} has not yet been calculated or an error occurred during the calculation`,
			);
		}

		return configArray;
	}
Returns a configuration array for the given directory based on the CLI options.
This is a synchronous operation and does not read any files from disk. It's
intended to be used in locations where we know the config file has already
been loaded and we just need to get the configuration for a file.
@param {string} fileOrDirPath The path of the directory to retrieve a config object for.
@returns {FlatConfigArray} A configuration object for the directory.
@throws {Error} If `dirPath` is not a non-empty string.
@throws {Error} If `dirPath` is not an absolute path.
@throws {Error} If the config file was not already loaded.