fix eslint errors. remove tslint:* comments

This commit is contained in:
Alexander
2019-08-07 21:35:05 +03:00
parent 481d70d50d
commit 455f8b5511
3 changed files with 5 additions and 6 deletions

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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)];
});