From b2900c8f1bd6cd815189a170131b029871e2450a Mon Sep 17 00:00:00 2001 From: Andrew Plummer Date: Thu, 26 Nov 2020 10:53:16 +0000 Subject: [PATCH] Update typescript-eslint dependencies and apply fixes to fix CI (#33) --- package.json | 4 ++-- provider/index.ts | 2 +- provider/package.json | 4 ++-- provider/tests/index.test.ts | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 5de0835..cd3109d 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "eslint-plugin-prettier": "3.1.2", "prettier": "1.19.1", "@types/jest": "~24.0.22", - "@typescript-eslint/eslint-plugin": "2.16.0", - "@typescript-eslint/parser": "2.16.0" + "@typescript-eslint/eslint-plugin": "4.8.2", + "@typescript-eslint/parser": "4.8.2" } } diff --git a/provider/index.ts b/provider/index.ts index ee8dede..9bcdff9 100644 --- a/provider/index.ts +++ b/provider/index.ts @@ -56,7 +56,7 @@ interface DeleteEvent extends BaseEvent { interface Response { PhysicalResourceId: string; - Data: {}; + Data: Record; } type Event = CreateEvent | UpdateEvent | DeleteEvent; diff --git a/provider/package.json b/provider/package.json index 23bb120..9f8a9f9 100644 --- a/provider/package.json +++ b/provider/package.json @@ -21,8 +21,8 @@ }, "devDependencies": { "@types/jest": "~24.0.22", - "@typescript-eslint/eslint-plugin": "2.16.0", - "@typescript-eslint/parser": "2.16.0", + "@typescript-eslint/eslint-plugin": "4.8.2", + "@typescript-eslint/parser": "4.8.2", "aws-sdk": ">=2", "eslint": "6.8.0", "eslint-config-prettier": "6.9.0", diff --git a/provider/tests/index.test.ts b/provider/tests/index.test.ts index f067a57..0773551 100644 --- a/provider/tests/index.test.ts +++ b/provider/tests/index.test.ts @@ -33,7 +33,7 @@ beforeEach(() => { }), })); mockSecretsManagerPutSecretValue.mockImplementation(() => ({ - promise: (): Promise => Promise.resolve({}), + promise: (): Promise> => Promise.resolve({}), })); }); @@ -64,7 +64,7 @@ const setMockSpawn = (props: SetMockSpawnProps): MockChildProcess => { const { stdoutData = null, stderrData = null, code = 0 } = props; const emitter = new MockChildProcess(); // eslint-disable-next-line @typescript-eslint/no-unused-vars - (childProcess.spawn as jest.Mock).mockImplementationOnce((file: string, args: Array, options: object) => { + (childProcess.spawn as jest.Mock).mockImplementationOnce((file: string, args: Array, options: Record) => { if (stdoutData) { setTimeout(() => { emitter.stdout.emit('data', new TextEncoder().encode(stdoutData)); @@ -94,7 +94,7 @@ describe('onCreate', () => { })); const mockProc = setMockSpawn({ stdoutData: JSON.stringify({ a: 'abc' }) }); mockSecretsManagerPutSecretValue.mockImplementation(() => ({ - promise: (): Promise => Promise.resolve({}), + promise: (): Promise> => Promise.resolve({}), })); expect(