diff --git a/Jakefile.js b/Jakefile.js index 5a3348a61eb..b62cbed3279 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -912,10 +912,11 @@ function lintFileAsync(options, path, cb) { } var servicesLintTargets = [ - "services.ts", - "outliningElementsCollector.ts", "navigateTo.ts", + "outliningElementsCollector.ts", "patternMatcher.ts", + "services.ts", + "shims.ts", ].map(function (s) { return path.join(servicesDirectory, s); }); diff --git a/src/services/shims.ts b/src/services/shims.ts index 90a015240f0..9940a6140f7 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -16,7 +16,11 @@ /// /* @internal */ -var debugObjectHost = (this); +let debugObjectHost = (this); + +// We need to use 'null' to interface with the managed side. +/* tslint:disable:no-null */ +/* tslint:disable:no-in-operator */ /* @internal */ namespace ts { @@ -234,8 +238,6 @@ namespace ts { } class ScriptSnapshotShimAdapter implements IScriptSnapshot { - private lineStartPositions: number[] = null; - constructor(private scriptSnapshotShim: ScriptSnapshotShim) { } @@ -940,7 +942,7 @@ namespace ts { return { options: {}, files: [], - errors: [realizeDiagnostic(result.error, '\r\n')] + errors: [realizeDiagnostic(result.error, "\r\n")] }; } @@ -949,7 +951,7 @@ namespace ts { return { options: configFile.options, files: configFile.fileNames, - errors: realizeDiagnostics(configFile.errors, '\r\n') + errors: realizeDiagnostics(configFile.errors, "\r\n") }; }); } @@ -1039,12 +1041,21 @@ namespace ts { } } +/* tslint:enable:no-in-operator */ +/* tslint:enable:no-null */ + /// TODO: this is used by VS, clean this up on both sides of the interface /* @internal */ -module TypeScript.Services { - export var TypeScriptServicesFactory = ts.TypeScriptServicesFactory; +namespace TypeScript.Services { + export const TypeScriptServicesFactory = ts.TypeScriptServicesFactory; } +/* tslint:disable:no-unused-variable */ +// 'toolsVersion' gets consumed by the managed side, so it's not unused. +// TODO: it should be moved into a namespace though. + /* @internal */ const toolsVersion = "1.6"; + +/* tslint:enable:no-unused-variable */ \ No newline at end of file