/** * @packageDocumentation * Markdown-aware retext integration for comment-only ESLint rules. */ import type { TSESLint, TSESTree } from "@typescript-eslint/utils"; /** Normalized retext message with stable source offsets. */ export type RetextLintMessage = Readonly<{ actual: null | string; endOffset: number; expected: readonly string[]; note: null | string; reason: string; ruleId: null | string; source: RetextMessageSource; startOffset: number; }>; /** Optional rule-id filter shared by rule wrappers. */ export type RetextMessageFilterOptions = Readonly<{ allow?: readonly string[]; deny?: readonly string[]; }>; /** Supported message sources emitted by retext rules used in this plugin. */ export type RetextMessageSource = "retext-equality" | "retext-profanities" | "retext-readability" | "retext-spell"; /** Narrow processor surface exposed to rule-specific configuration callbacks. */ type RetextConfigurableProcessor = Readonly<{ use: (plugin: unknown, options?: unknown) => RetextConfigurableProcessor; }>; /** Project markdown into a same-length plain-text string for retext analysis. */ export declare const projectMarkdownCommentText: (source: string) => string; /** Run one markdown-aware retext analysis pass against projected comment text. */ export declare const lintMarkdownWithRetext: (text: string, configureProcessor: (processor: RetextConfigurableProcessor) => void, filter?: Readonly) => readonly RetextLintMessage[]; /** Convert normalized retext message offsets into an ESLint source location. */ export declare const createRetextMessageSourceLocation: (comment: Readonly, sourceCode: Readonly, message: Readonly>) => TSESLint.AST.SourceLocation; export {}; //# sourceMappingURL=retext.d.ts.map