import { TSESLint, TSESTree } from "@typescript-eslint/utils"; export type Mode = "loose" | "strict"; export interface EvaluatorOptions { brands?: string[]; acronyms?: string[]; replaceDefaultAcronyms?: boolean; ignoreWords?: string[]; ignoreRegex?: string[]; mode?: Mode; enforceCamelCaseLower?: boolean; } export interface EvaluationResult { ok: boolean; suggestion?: string; } export interface SentenceCaseRuleConfig extends EvaluatorOptions { allowAutoFix?: boolean; } export type SentenceCaseRuleOptions = readonly [SentenceCaseRuleConfig?]; export interface SentenceCaseReporterParams { context: TSESLint.RuleContext; evaluatorOptions: EvaluatorOptions; allowAutoFix: boolean; messageId: MessageId; } export type SentenceCaseReport = (node: TSESTree.Node, value: string) => void; export declare function resolveSentenceCaseConfig(options: SentenceCaseRuleOptions): { config: SentenceCaseRuleConfig; evaluatorOptions: EvaluatorOptions; allowAutoFix: boolean; }; export declare function createSentenceCaseEvaluator(evaluatorOptions: EvaluatorOptions): (value: string) => string | undefined; export declare function createSentenceCaseReporter(params: SentenceCaseReporterParams): SentenceCaseReport; export declare function getStaticStringValue(node: TSESTree.Node): string | null; export declare function recaseStringSource(source: string, value: string, suggestion: string): string | null; export declare function getContextFilename(context: TSESLint.RuleContext): string | null; export declare function isEnglishLocalePath(filePath: string, extensions: readonly string[], cwd?: string): boolean; export declare function isExpressionNode(node: TSESTree.Node | null | undefined): node is TSESTree.Expression; export declare function unwrapExpression(node: TSESTree.Node | null | undefined): TSESTree.Expression | null; export declare function isSkippableString(text: string, brands?: readonly string[]): boolean; /** * The ranges of the URLs in `text`, as /\b[a-z][a-z0-9+.-]*:\/\/\S+/gi finds * them: "https://obsidian.md/help", "obsidian://open?vault=Notes". The regex * retries from every word start in a run of scheme characters that does not * end in "://", which is quadratic on text such as "a.a.a…". Here each "://" * looks back over its own run once: the URL starts at the run's first letter * that starts a word, and ends at the next whitespace. */ export declare function urlRanges(text: string): number[][]; /** * The ranges of the time formats with an AM/PM token in `text`, as * /(?