From 6e739d37d4d5566193f342d4225afbfbac6312f5 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 29 Mar 2016 14:04:21 -0700 Subject: [PATCH] Fix lint failures --- src/compiler/utilities.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index d817872a3e6..d28ffbfeedc 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -181,16 +181,16 @@ namespace ts { export function getEndLinePosition(line: number, sourceFile: SourceFile): number { Debug.assert(line >= 0); - let lineStarts = getLineStarts(sourceFile); + const lineStarts = getLineStarts(sourceFile); - let lineIndex = line; + const lineIndex = line; if (lineIndex + 1 === lineStarts.length) { // last line - return EOF return sourceFile.text.length - 1; } else { // current line start - let start = lineStarts[lineIndex]; + const start = lineStarts[lineIndex]; // take the start position of the next line -1 = it should be some line break let pos = lineStarts[lineIndex + 1] - 1; Debug.assert(isLineBreak(sourceFile.text.charCodeAt(pos)));