diff --git a/.eslintrc.base.json b/.eslintrc.base.json index c9a6739..af358ed 100644 --- a/.eslintrc.base.json +++ b/.eslintrc.base.json @@ -46,7 +46,6 @@ "no-floating-decimal": "error", "no-implicit-coercion": "error", "no-implied-eval": "error", - // Turn off until fix for: https://github.com/typescript-eslint/typescript-eslint/issues/239 "no-inner-declarations": "off", "no-lone-blocks": "error", "no-lonely-if": "error", @@ -115,6 +114,7 @@ "no-throw-literal": "error", "no-unmodified-loop-condition": "warn", "no-unneeded-ternary": "error", + "no-unused-expressions": "error", "no-use-before-define": "off", "no-useless-call": "error", "no-useless-catch": "error", @@ -136,6 +136,7 @@ ], "prefer-numeric-literals": "error", "prefer-object-spread": "error", + "prefer-promise-reject-errors": ["error", { "allowEmptyReject": true }], "prefer-rest-params": "error", "prefer-spread": "error", "prefer-template": "error", @@ -153,10 +154,7 @@ } ], "yoda": "error", - "import/export": "off", "import/extensions": ["error", "never"], - "import/named": "off", - "import/namespace": "off", "import/newline-after-import": "warn", "import/no-absolute-path": "error", "import/no-cycle": "off", diff --git a/src/codelens/codeLensProvider.ts b/src/codelens/codeLensProvider.ts index 1bc28a0..aac7e10 100644 --- a/src/codelens/codeLensProvider.ts +++ b/src/codelens/codeLensProvider.ts @@ -475,6 +475,7 @@ export class GitCodeLensProvider implements CodeLensProvider { resolveCodeLens(lens: CodeLens, token: CancellationToken): CodeLens | Promise { if (lens instanceof GitRecentChangeCodeLens) return this.resolveGitRecentChangeCodeLens(lens, token); if (lens instanceof GitAuthorsCodeLens) return this.resolveGitAuthorsCodeLens(lens, token); + // eslint-disable-next-line prefer-promise-reject-errors return Promise.reject(undefined); } diff --git a/src/plus/subscription/serverConnection.ts b/src/plus/subscription/serverConnection.ts index f8ad6cb..f03a667 100644 --- a/src/plus/subscription/serverConnection.ts +++ b/src/plus/subscription/serverConnection.ts @@ -142,6 +142,7 @@ export class ServerConnection implements Disposable { return Promise.race([ deferredCodeExchange.promise, new Promise((_, reject) => + // eslint-disable-next-line prefer-promise-reject-errors this._cancellationSource?.token.onCancellationRequested(() => reject('Cancelled')), ), new Promise((_, reject) => setTimeout(reject, 120000, 'Cancelled')),