From 195044ca1112cee8245537e6972f81a4ebe5bb35 Mon Sep 17 00:00:00 2001 From: Francesco Guardiani Date: Wed, 31 Jan 2024 17:36:38 +0100 Subject: [PATCH] Fix linting issues --- src/types/types.ts | 7 ------- test/side_effect.test.ts | 2 +- test/utils.test.ts | 6 ++++-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/types/types.ts b/src/types/types.ts index 9a10d1c3..23df8be6 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -11,20 +11,13 @@ import { AWAKEABLE_ENTRY_MESSAGE_TYPE, - BACKGROUND_INVOKE_ENTRY_MESSAGE_TYPE, - CLEAR_STATE_ENTRY_MESSAGE_TYPE, - COMPLETE_AWAKEABLE_ENTRY_MESSAGE_TYPE, COMPLETION_MESSAGE_TYPE, ENTRY_ACK_MESSAGE_TYPE, ERROR_MESSAGE_TYPE, GET_STATE_ENTRY_MESSAGE_TYPE, - INVOKE_ENTRY_MESSAGE_TYPE, KNOWN_MESSAGE_TYPES, - OUTPUT_STREAM_ENTRY_MESSAGE_TYPE, POLL_INPUT_STREAM_ENTRY_MESSAGE_TYPE, ProtocolMessage, - SET_STATE_ENTRY_MESSAGE_TYPE, - SIDE_EFFECT_ENTRY_MESSAGE_TYPE, SLEEP_ENTRY_MESSAGE_TYPE, START_MESSAGE_TYPE, SUSPENSION_MESSAGE_TYPE, diff --git a/test/side_effect.test.ts b/test/side_effect.test.ts index 213cee01..b18c977b 100644 --- a/test/side_effect.test.ts +++ b/test/side_effect.test.ts @@ -916,7 +916,7 @@ export class UnawaitedSideEffectShouldFailSubsequentContextCallService implements TestGreeter { constructor( - // eslint-disable-next-line @typescript-eslint/no-empty-function + // eslint-disable-next-line @typescript-eslint/no-empty-function,@typescript-eslint/no-unused-vars private readonly next = (ctx: restate.RestateContext): void => {} ) {} diff --git a/test/utils.test.ts b/test/utils.test.ts index ec09b016..5ac89476 100644 --- a/test/utils.test.ts +++ b/test/utils.test.ts @@ -155,22 +155,24 @@ describe("jsonSafeAny", () => { expect(jsonSafeAny("", BigInt("9007199254740991"))).toStrictEqual( BigInt("9007199254740991") ); + // eslint-disable-next-line @typescript-eslint/no-explicit-any (BigInt.prototype as any).toJSON = function () { return this.toString(); }; expect(jsonSafeAny("", BigInt("9007199254740991"))).toStrictEqual( "9007199254740991" ); + // eslint-disable-next-line @typescript-eslint/no-explicit-any delete (BigInt.prototype as any).toJSON; }); it("handles custom types", () => { const numberType = { - toJSON(key: string): number { + toJSON(): number { return 1; }, }; const stringType = { - toJSON(key: string): string { + toJSON(): string { return "foo"; }, };