/** * .gitignore parser — loads ignore patterns and tests file paths against them. */ export interface IgnoreRules { patterns: IgnorePattern[]; projectRoot: string; } interface IgnorePattern { regex: RegExp; negated: boolean; } /** * Load .gitignore rules from a project root. * Falls back to built-in ignores if no .gitignore exists. */ export declare function loadIgnoreRules(projectRoot: string): IgnoreRules; /** * Test whether a file path should be ignored. * @param filePath Absolute or relative path * @param rules Loaded ignore rules * @returns true if the path should be ignored */ export declare function isIgnored(filePath: string, rules: IgnoreRules): boolean; /** * The rules that still apply beneath a directory the user named on purpose * (`@dir dist`). Drops every pattern that ignores the directory itself * (`dist/`, `/dist`) or all of its children at once (`dist/*`, `dist/**`), * and keeps the rest (`*.log`, `secrets.json`, negations), so naming a * directory never hides its whole contents. */ export declare function rulesBelow(dir: string, rules: IgnoreRules): IgnoreRules; export {};