diff --git a/Jakefile.js b/Jakefile.js index 5dfbcc26d74..7cd36aaa8bd 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -106,6 +106,16 @@ var serverCoreSources = [ return path.join(serverDirectory, f); }); +var scriptSources = [ + "tslint/booleanTriviaRule.ts", + "tslint/nextLineRule.ts", + "tslint/noNullRule.ts", + "tslint/preferConstRule.ts", + "tslint/typeOperatorSpacingRule.ts" +].map(function (f) { + return path.join(scriptsDirectory, f); +}); + var serverSources = serverCoreSources.concat(servicesSources); var languageServiceLibrarySources = [ @@ -365,7 +375,6 @@ file(builtGeneratedDiagnosticMessagesJSON,[generatedDiagnosticMessagesJSON], fun desc("Generates a diagnostic file in TypeScript based on an input JSON file"); task("generate-diagnostics", [diagnosticInfoMapTs]); - // Publish nightly var configureNightlyJs = path.join(scriptsDirectory, "configureNightly.js"); var configureNightlyTs = path.join(scriptsDirectory, "configureNightly.ts"); @@ -909,7 +918,8 @@ function lintFileAsync(options, path, cb) { var lintTargets = compilerSources .concat(harnessCoreSources) - .concat(serverCoreSources); + .concat(serverCoreSources) + .concat(scriptSources); desc("Runs tslint on the compiler sources"); task("lint", ["build-rules"], function() { diff --git a/scripts/tslint/typeOperatorSpacingRule.ts b/scripts/tslint/typeOperatorSpacingRule.ts index 4196d024768..7ceef2372bf 100644 --- a/scripts/tslint/typeOperatorSpacingRule.ts +++ b/scripts/tslint/typeOperatorSpacingRule.ts @@ -13,10 +13,10 @@ export class Rule extends Lint.Rules.AbstractRule { class TypeOperatorSpacingWalker extends Lint.RuleWalker { public visitNode(node: ts.Node) { if (node.kind === ts.SyntaxKind.UnionType || node.kind === ts.SyntaxKind.IntersectionType) { - let types = (node).types; + const types = (node).types; let expectedStart = types[0].end + 2; // space, | or & for (let i = 1; i < types.length; i++) { - let currentType = types[i]; + const currentType = types[i]; if (expectedStart !== currentType.pos || currentType.getLeadingTriviaWidth() !== 1) { const failure = this.createFailure(currentType.pos, currentType.getWidth(), Rule.FAILURE_STRING); this.addFailure(failure);