import { ESLint } from "eslint"; //#region src/next/fix-auth-protection.d.ts interface FixAuthProtectionOptions { /** File, directory, or glob patterns to scan. Defaults to `['.']`. */ patterns?: string[]; /** Working directory ESLint resolves config and files against. Defaults to `process.cwd()`. */ cwd?: string; /** Compute the changes without writing them to disk. */ dryRun?: boolean; /** * Advanced/escape hatch: a pre-configured ESLint instance to lint with. When * omitted, a default `new ESLint({ cwd })` is used, which discovers the * consumer's flat config. Mainly useful for tests. */ eslint?: ESLint; /** * Called before scanning with the path to the ESLint config file that will be * used (or `undefined` when none is found / an instance was injected). */ onConfigResolved?: (configFilePath: string | undefined) => void; /** * Called once linting finishes and per-file fixing begins, with the number of * files that have flagged resources. Useful for reporting progress, since the * initial lint can be slow on large projects. */ onScanComplete?: (fileCount: number) => void; /** Called after each file is fixed (or, in `dryRun`, would be fixed). */ onFileFixed?: (file: FixedFile) => void; } interface FixedFile { filePath: string; /** Number of resources that had `await auth.protect()` applied. */ protections: number; } interface UnresolvedIssue { line: number; column: number; message: string; } interface UnresolvedFile { filePath: string; issues: UnresolvedIssue[]; } interface FixAuthProtectionResult { /** Files that were (or, in `dryRun`, would be) modified. */ fixed: FixedFile[]; /** Files with flagged resources that have no safe automatic fix. */ unresolved: UnresolvedFile[]; } /** * Lint the given patterns with the consumer's ESLint config and apply the * `require-auth-protection` rule's `await auth.protect()` suggestions to every * resource it can safely fix. */ declare function fixAuthProtection(options?: FixAuthProtectionOptions): Promise; //#endregion export { FixAuthProtectionOptions, FixAuthProtectionResult, FixedFile, UnresolvedFile, UnresolvedIssue, fixAuthProtection }; //# sourceMappingURL=fix-auth-protection.d.ts.map