Skip to content

Commit

Permalink
Eslint config: fix no-floating-promises rule
Browse files Browse the repository at this point in the history
  • Loading branch information
ioay committed Jan 16, 2024
1 parent 2eabd86 commit d2ead5b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
13 changes: 0 additions & 13 deletions dapp/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 0 additions & 1 deletion dapp/src/hooks/useDepositBTCTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion dapp/src/types/callback.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type OnSuccessCallback = () => void | Promise<void>
export type OnSuccessCallback = () => void

0 comments on commit d2ead5b

Please sign in to comment.