@adguard/aglint
Version:
Universal adblock filter list linter.
17 lines (16 loc) • 841 B
TypeScript
import { type LinterConfig } from '../common';
/**
* Constructs a config object for the given directory by merging all config files
* from the root config file to the actual directory. It searches all config files
* in the upper directories until it finds a root config file or the actual directory
* is the root directory, then it merges the config files from the root directory
* to the actual directory after each other. This will results the corresponding
* config object for the given directory. Works same as ESLint.
*
* @param dir Base directory
* @returns Config object
* @throws If no config file was found
* @throws If a config file is found, but it is not valid
* @throws If multiple config files are found in the same directory
*/
export declare function buildConfigForDirectory(dir: string): Promise<LinterConfig>;