Skip to content

Commit 900e89c

Browse files
committed
Disabled floating promise lint rule globally
1 parent d621cda commit 900e89c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"no-await-in-loop": "off",
77
"react-hooks/rules-of-hooks": "off",
88
"no-console": "off",
9-
"import/no-unresolved": "off"
9+
"import/no-unresolved": "off",
10+
"@typescript-eslint/no-floating-promises": "off"
1011
},
1112
"parserOptions": {
1213
"project": ["./tsconfig.json", "./test/tsconfig.json"]

src/pure.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,18 @@ function renderHook<TProps, TResult>(
9090
) as ReactElement
9191

9292
let testRenderer: ReactTestRenderer
93-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
9493
act(() => {
9594
testRenderer = create(toRender())
9695
})
97-
96+
9897
function rerenderHook(newProps: typeof initialProps = hookProps.current) {
9998
hookProps.current = newProps
100-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
10199
act(() => {
102100
testRenderer.update(toRender())
103101
})
104102
}
105103

106104
function unmountHook() {
107-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
108105
act(() => {
109106
removeCleanup(unmountHook)
110107
testRenderer.unmount()

0 commit comments

Comments
 (0)