Fix lint errors.

This commit is contained in:
Daniel Rosenwasser 2016-01-16 14:05:46 -08:00
parent 6fa51f1c02
commit 26fdf891e9
5 changed files with 11 additions and 9 deletions

View file

@ -14600,7 +14600,7 @@ namespace ts {
}
function hasExportedMembers(moduleSymbol: Symbol) {
for (var id in moduleSymbol.exports) {
for (const id in moduleSymbol.exports) {
if (id !== "export=") {
return true;
}

View file

@ -718,7 +718,8 @@ namespace ts {
}
// Find the component that differs
for (var joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) {
let joinStartIndex: number;
for (joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) {
if (getCanonicalFileName(directoryComponents[joinStartIndex]) !== getCanonicalFileName(pathComponents[joinStartIndex])) {
break;
}

View file

@ -1250,7 +1250,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
else {
// One object literal with all the attributes in them
write("{");
for (var i = 0; i < attrs.length; i++) {
for (let i = 0, n = attrs.length; i < n; i++) {
if (i > 0) {
write(", ");
}
@ -1262,7 +1262,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
// Children
if (children) {
for (var i = 0; i < children.length; i++) {
for (let i = 0; i < children.length; i++) {
// Don't emit empty expressions
if (children[i].kind === SyntaxKind.JsxExpression && !((<JsxExpression>children[i]).expression)) {
continue;
@ -1356,7 +1356,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
function emitJsxElement(node: JsxElement) {
emitJsxOpeningOrSelfClosingElement(node.openingElement);
for (var i = 0, n = node.children.length; i < n; i++) {
for (let i = 0, n = node.children.length; i < n; i++) {
emit(node.children[i]);
}
@ -5172,7 +5172,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
// a lexical declaration such as a LexicalDeclaration or a ClassDeclaration.
if (isClassExpressionWithStaticProperties) {
for (var property of staticProperties) {
for (const property of staticProperties) {
write(",");
writeLine();
emitPropertyDeclaration(node, property, /*receiver*/ tempVariable, /*isExpression*/ true);
@ -5719,7 +5719,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
const parameters = valueDeclaration.parameters;
const parameterCount = parameters.length;
if (parameterCount > 0) {
for (var i = 0; i < parameterCount; i++) {
for (let i = 0; i < parameterCount; i++) {
if (i > 0) {
write(", ");
}

View file

@ -1217,7 +1217,7 @@ namespace ts {
if (sourceFiles) {
const absoluteRootDirectoryPath = host.getCanonicalFileName(getNormalizedAbsolutePath(rootDirectory, currentDirectory));
for (var sourceFile of sourceFiles) {
for (const sourceFile of sourceFiles) {
if (!isDeclarationFile(sourceFile)) {
const absoluteSourceFilePath = host.getCanonicalFileName(getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory));
if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) {

View file

@ -6828,7 +6828,8 @@ namespace ts {
function classifyDisabledMergeCode(text: string, start: number, end: number) {
// Classify the line that the ======= marker is on as a comment. Then just lex
// all further tokens and add them to the result.
for (var i = start; i < end; i++) {
let i: number;
for (i = start; i < end; i++) {
if (isLineBreak(text.charCodeAt(i))) {
break;
}