@ton-ai-core/vibecode-linter
Version:
Advanced TypeScript linter with Git integration, dependency analysis, and comprehensive error reporting
30 lines • 1.14 kB
TypeScript
import type { LintMessageWithFile } from "../types/index.js";
/**
* Find real (string index) column for a desired visual column on a line.
*
* @param currentLine - immutable line content
* @param targetVisualColumn - desired visual column (0-based)
* @returns real column index (0..line.length)
*
* @pure true
* @invariant 0 ≤ result ≤ currentLine.length
* @complexity O(n) where n = |currentLine|
*/
export declare function calculateColumnPosition(currentLine: string, targetVisualColumn: number): number;
/**
* Compute highlight range for a lint message on a given line.
*
* @param m - LintMessage with file and positions
* @param currentLine - line content
* @param startCol - starting real column index
* @returns [start, end) range as closed interval on string indices
*
* @pure true
* @invariant 0 ≤ start ≤ end ≤ currentLine.length
* @complexity O(1) (heuristics) + O(k) where k depends on local parsing
*/
export declare function calculateHighlightRange(m: LintMessageWithFile, currentLine: string, startCol: number): {
start: number;
end: number;
};
//# sourceMappingURL=highlight.d.ts.map