diff --git a/test/use-swr-loading.test.tsx b/test/use-swr-loading.test.tsx index 80f788254..4c7241f68 100644 --- a/test/use-swr-loading.test.tsx +++ b/test/use-swr-loading.test.tsx @@ -321,14 +321,24 @@ describe('useSWR - loading', () => { it('isLoading and isValidating should always respect cache value', async () => { const key = createKey() const Page = () => { - const { data } = useSWR(key, () => createResponse('result', { delay: 10 })) - const { data: response } = useSWR(data, () => createResponse('data', { delay: 10 })) + const { data } = useSWR(key, () => + createResponse('result', { delay: 10 }) + ) + const { data: response } = useSWR(data, () => + createResponse('data', { delay: 10 }) + ) // eslint-disable-next-line react/display-name const Component = ((_: any) => () => { - // eslint-disable-next-line react-hooks/rules-of-hooks - const { data: result, isLoading, isValidating } = useSWR(key, () => createResponse('result', { delay: 10 })) + const { + data: result, + isLoading, + isValidating + // eslint-disable-next-line react-hooks/rules-of-hooks + } = useSWR(key, () => createResponse('result', { delay: 10 })) return ( -