/** * Plugin rule discovery: loads third-party {@link ScanRule}s from a directory * of ES module files. Each `.mjs` (or `.js`) file may export a single rule, * an array of rules, or a factory function returning either. */ import { ScanRule } from './types.js'; /** Default directory scanned for third-party rule plugins. */ export declare function getDefaultRulesDir(): string; /** A rule exported by a plugin module, or a factory producing one. */ export type RuleModuleExport = ScanRule | ScanRule[] | (() => ScanRule | ScanRule[]); /** Result of loading one plugin file. */ export interface LoadedRuleFile { /** Absolute path of the loaded file. */ readonly filePath: string; /** Rules exported by the file. */ readonly rules: ScanRule[]; } /** * Load all rule plugin files from a directory. * * Files are read in lexical order so rule order is deterministic. Invalid * files are skipped — a broken plugin must not take down the whole scan. * * @param dir - Directory to scan for `*.mjs` / `*.js` rule files. * @returns Per-file load results for every successfully loaded file. */ export declare function loadRulesFromDirectory(dir?: string): Promise; //# sourceMappingURL=rule-loader.d.ts.map