From cd88417f49a9baa5525b2cf9975a9436cbf715dd Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 3 Jan 2019 16:30:00 -0800 Subject: [PATCH] Enabling a few more tslint rules in the codebase --- .../platform/credentials/test/node/keytar.test.ts | 1 + .../workbench/api/node/extHostTypeConverters.ts | 4 ---- tslint.json | 15 +++++++++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/vs/platform/credentials/test/node/keytar.test.ts b/src/vs/platform/credentials/test/node/keytar.test.ts index 1d3e782c59c..141e6ab904f 100644 --- a/src/vs/platform/credentials/test/node/keytar.test.ts +++ b/src/vs/platform/credentials/test/node/keytar.test.ts @@ -26,6 +26,7 @@ suite('Keytar', () => { try { await keytar.deletePassword(name, 'foo'); } finally { + // tslint:disable-next-line: no-unsafe-finally throw err; } } diff --git a/src/vs/workbench/api/node/extHostTypeConverters.ts b/src/vs/workbench/api/node/extHostTypeConverters.ts index c6bead707d7..b33aeb0aefb 100644 --- a/src/vs/workbench/api/node/extHostTypeConverters.ts +++ b/src/vs/workbench/api/node/extHostTypeConverters.ts @@ -1008,8 +1008,6 @@ export namespace LogLevel { return _MainLogLevel.Error; case types.LogLevel.Critical: return _MainLogLevel.Critical; - case types.LogLevel.Critical: - return _MainLogLevel.Critical; case types.LogLevel.Off: return _MainLogLevel.Off; } @@ -1031,8 +1029,6 @@ export namespace LogLevel { return types.LogLevel.Error; case _MainLogLevel.Critical: return types.LogLevel.Critical; - case _MainLogLevel.Critical: - return types.LogLevel.Critical; case _MainLogLevel.Off: return types.LogLevel.Off; } diff --git a/tslint.json b/tslint.json index 476f99d2237..ea384670924 100644 --- a/tslint.json +++ b/tslint.json @@ -3,11 +3,22 @@ "build/lib/tslint" ], "rules": { - "no-string-throw": true, - "no-unused-expression": true, + "no-construct": true, + "no-duplicate-super": true, + "no-duplicate-switch-case": true, "no-duplicate-variable": true, + "no-eval": true, + "no-sparse-arrays": true, + "no-string-throw": true, + "no-unbound-method": [ + true, + "ignore-static" + ], + "no-unsafe-finally": true, + "no-unused-expression": true, "curly": true, "class-name": true, + "label-position": true, "semicolon": [ true, "always"