import type { Problem, RecheckConfig, NormalizedRule, Fix } from './types/index.js'; import type { FileInput } from './core/runner.js'; export { parseMarkdown, filterByTypes } from './parser/index.js'; export type { ParseOptions } from './parser/index.js'; export type { Token, TokenTree } from './parser/types.js'; export { extractScopes } from './scopes/extractor.js'; export type { ScopedSegment } from './scopes/types.js'; export { applyFixesToContent } from './core/auto-fix.js'; export type { ApplyFixesResult } from './core/auto-fix.js'; export { loadConfig } from './config/load.js'; export type { LoadResult } from './config/load.js'; export type { Problem, Fix } from './types/problems.js'; export type { NormalizedRule, RecheckConfig } from './types/rules.js'; export type { RuleSeverity } from './types/rules.js'; export type { ValidationError } from './types/validation.js'; export { needsImageMetadata, loadImageMetadata, MAX_IMAGE_REFS_PER_FILE } from './core/files.js'; export { runRules, runRulesUntilStable } from './core/runner.js'; export type { FileInput, RunResult, RunnerOptions } from './core/runner.js'; export { computeTextStatistics, computeReadability } from './metrics/index.js'; export type { TextStatistics, ReadabilityFormula } from './metrics/index.js'; export { TECHNICAL_PROPER_NOUNS } from './data/proper-nouns.js'; /** * Lints a single in-memory markdown string against a config, with no file I/O. * * Because there's no disk access here, rules that depend on on-disk facts * (e.g. `max-image-size`, which needs image byte size) can't resolve that * data themselves. Callers who need those rules to fire must supply the * relevant `metadata` up front; `lintFiles` does this automatically since it * reads from disk. */ export declare function lintContent(content: string, config: RecheckConfig, opts?: { filePath?: string; metadata?: FileInput['metadata']; configDir?: string; }): Promise; /** A file `lintFiles` could not read and therefore did not lint. */ export interface SkippedFile { path: string; /** Why the read failed (the underlying error's message, e.g. EACCES/ENOENT). */ reason: string; } /** * Lints markdown files from disk, optionally writing auto-fixes back. * * `config` accepts either a raw `RecheckConfig` (validated and normalized * here via `validate()`) or an already-normalized `NormalizedRule[]` — e.g. * from `loadConfig()` — for callers that have their own config-loading step * and just want to run the engine against a file list. Passing an array * skips validation, since the rules are assumed already validated. * * Unreadable files are warned about and skipped rather than failing the * whole call — one bad path (permissions, race with a delete, etc.) * shouldn't take down linting for the rest of the batch. Every skipped * file is also reported in the returned `skippedFiles` (path + reason), so * callers that must know their coverage was incomplete — a security review * consuming lint results, say — get a programmatic signal, not just a * console warning. Reads (and any image-metadata loading) run with bounded * concurrency via `mapLimit`. * * `opts.root` is the lint root that image-metadata loading is confined to * (see `loadImageMetadata`): image refs resolving outside it — lexically or * physically, via a symlink planted inside the root — are treated as * missing without leaking the target's existence or size. Defaults to * `process.cwd()`; pass it explicitly when the linted files live elsewhere * (e.g. a checked-out repo under a temp dir). * * `opts.maxProblems` caps how many problems the run may collect (see * `RunnerOptions.maxProblems`): once a file's lint reaches the cap, later * files aren't linted at all and the returned `truncated` flag is true, so * memory stays bounded on pathological inputs. */ export declare function lintFiles(paths: string[], config: RecheckConfig | NormalizedRule[], opts?: { fix?: boolean; root?: string; maxProblems?: number; configDir?: string; }): Promise<{ problems: Problem[]; fixedFiles: Map; skippedFiles: SkippedFile[]; truncated: boolean; /** * Proposed fixes that never landed: overlapping edits, plus fixes withheld to * avoid rewriting a Markdoc tag. Already present at runtime via * `{ ...result, skippedFiles }` below; declared here so typed callers can see * it. */ skippedFixes: Fix[]; }>; //# sourceMappingURL=index.d.ts.map