From c20146f3b7513ae3a3df3dead651d2a2dea988af Mon Sep 17 00:00:00 2001 From: Bartosz Kaszubowski Date: Tue, 16 Nov 2021 14:34:16 +0100 Subject: [PATCH] chore: clean up tsconfig and eslint rules (#123) --- .eslintrc.js | 5 ----- src/cache.ts | 4 ++-- src/run.ts | 2 +- tests/run.test.ts | 2 +- tsconfig.json | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index d176ef60..7a955612 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -14,14 +14,9 @@ module.exports = { 'plugin:@typescript-eslint/recommended', ], rules: { - '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-member-accessibility': [ 'error', { 'accessibility': 'no-public' }, ], - '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/indent': ['error', 'tab'], - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/no-explicit-any': 'off', }, }; diff --git a/src/cache.ts b/src/cache.ts index d15e2a5a..0b12d2ff 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -43,7 +43,7 @@ export async function fromRemoteCache(config: CacheConfig): Promise { ); addPath(path); - } catch (error: any) { + } catch (error) { tools.handleError(name, error); } diff --git a/tests/run.test.ts b/tests/run.test.ts index 414706ef..60b7a58f 100644 --- a/tests/run.test.ts +++ b/tests/run.test.ts @@ -1,7 +1,7 @@ const core = { addPath: jest.fn(), getInput: jest.fn(), - group: (message: string, action: () => Promise) => action(), + group: (message: string, action: () => Promise): Promise => action(), info: jest.fn(), }; const exec = { exec: jest.fn() }; diff --git a/tsconfig.json b/tsconfig.json index 828b3b2b..0ab0216b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "outDir": "./build", "rootDir": "./src", - "noImplicitAny": false + "useUnknownInCatchVariables": false }, "exclude": [ "build",