From 455f8b551187084f08528bd09d984ee58c19c3e5 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 7 Aug 2019 21:35:05 +0300 Subject: [PATCH] fix eslint errors. remove tslint:* comments --- src/compiler/perfLogger.ts | 4 ++-- src/harness/vfs.ts | 5 ++--- src/testRunner/unittests/tsbuild/watchMode.ts | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/compiler/perfLogger.ts b/src/compiler/perfLogger.ts index 974e231d15d..1e78c190618 100644 --- a/src/compiler/perfLogger.ts +++ b/src/compiler/perfLogger.ts @@ -1,6 +1,6 @@ /* @internal */ namespace ts { - type PerfLogger = typeof import("@microsoft/typescript-etw"); // tslint:disable-line:no-implicit-dependencies + type PerfLogger = typeof import("@microsoft/typescript-etw"); const nullLogger: PerfLogger = { logEvent: noop, logErrEvent: noop, @@ -30,7 +30,7 @@ namespace ts { try { // require() will throw an exception if the module is not installed // It may also return undefined if not installed properly - etwModule = require("@microsoft/typescript-etw"); // tslint:disable-line:no-implicit-dependencies + etwModule = require("@microsoft/typescript-etw"); } catch (e) { etwModule = undefined; diff --git a/src/harness/vfs.ts b/src/harness/vfs.ts index 3d8cf145548..450d50d525c 100644 --- a/src/harness/vfs.ts +++ b/src/harness/vfs.ts @@ -1526,14 +1526,13 @@ namespace vfs { } return typeof value === "string" || Buffer.isBuffer(value) ? new File(value) : new Directory(value); } - /* eslint-enable no-null/no-null */ export function formatPatch(patch: FileSet): string; export function formatPatch(patch: FileSet | undefined): string | null; export function formatPatch(patch: FileSet | undefined) { - // tslint:disable-next-line:no-null-keyword return patch ? formatPatchWorker("", patch) : null; } + /* eslint-enable no-null/no-null */ function formatPatchWorker(dirname: string, container: FileSet): string { let text = ""; @@ -1568,7 +1567,7 @@ namespace vfs { } export function iteratePatch(patch: FileSet | undefined): IterableIterator<[string, string]> | null { - // tslint:disable-next-line:no-null-keyword + // eslint-disable-next-line no-null/no-null return patch ? Harness.Compiler.iterateOutputs(iteratePatchWorker("", patch)) : null; } diff --git a/src/testRunner/unittests/tsbuild/watchMode.ts b/src/testRunner/unittests/tsbuild/watchMode.ts index 02e7edbc00a..31ed96cece1 100644 --- a/src/testRunner/unittests/tsbuild/watchMode.ts +++ b/src/testRunner/unittests/tsbuild/watchMode.ts @@ -135,7 +135,7 @@ namespace ts.tscWatch { tests = subProjectFiles(SubProject.tests); ui = subProjectFiles(SubProject.ui); allFiles = [libFile, ...core, ...logic, ...tests, ...ui]; - testProjectExpectedWatchedFiles = [core[0], core[1], core[2]!, ...logic, ...tests].map(f => f.path.toLowerCase()); // tslint:disable-line no-unnecessary-type-assertion (TODO: type assertion should be necessary) + testProjectExpectedWatchedFiles = [core[0], core[1], core[2]!, ...logic, ...tests].map(f => f.path.toLowerCase()); testProjectExpectedWatchedDirectoriesRecursive = [projectPath(SubProject.core), projectPath(SubProject.logic)]; });