From d2ead5b4104a6ef1f9747861f9bcb00188e88f1e Mon Sep 17 00:00:00 2001 From: ioay Date: Tue, 16 Jan 2024 17:57:49 +0100 Subject: [PATCH] Eslint config: fix no-floating-promises rule --- dapp/.eslintrc | 13 ------------- dapp/src/hooks/useDepositBTCTransaction.ts | 1 - dapp/src/types/callback.ts | 2 +- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/dapp/.eslintrc b/dapp/.eslintrc index e0ec22303..c87013b23 100644 --- a/dapp/.eslintrc +++ b/dapp/.eslintrc @@ -17,19 +17,6 @@ ], "react/require-default-props": [0], }, - // FIXME: - // This is temporary solution after changes of the eslint-config version: @thesis-co/eslint-config: "github:thesis/eslint-config#7b9bc8c" - // Overrides rules should be fixed file by file. - "overrides": [ - { - "files": [ - "src/hooks/useSignMessage.ts" - ], - "rules": { - "@typescript-eslint/no-floating-promises": "off" - } - }, - ], "settings": { "import/resolver": { "alias": { diff --git a/dapp/src/hooks/useDepositBTCTransaction.ts b/dapp/src/hooks/useDepositBTCTransaction.ts index a3feb0507..e60d14c45 100644 --- a/dapp/src/hooks/useDepositBTCTransaction.ts +++ b/dapp/src/hooks/useDepositBTCTransaction.ts @@ -6,7 +6,6 @@ export function useDepositBTCTransaction(onSuccess?: OnSuccessCallback) { const depositBTC = useCallback(() => { if (onSuccess) { // FIXME: enable eslint rule when SDK ready - // eslint-disable-next-line @typescript-eslint/no-misused-promises setTimeout(onSuccess, 1000) } }, [onSuccess]) diff --git a/dapp/src/types/callback.ts b/dapp/src/types/callback.ts index 526705388..0c047f7c5 100644 --- a/dapp/src/types/callback.ts +++ b/dapp/src/types/callback.ts @@ -1 +1 @@ -export type OnSuccessCallback = () => void | Promise +export type OnSuccessCallback = () => void