From fa4ca66f20f6abe41f8fa051449bf3afe342ef28 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 14 May 2022 10:04:11 -0400 Subject: [PATCH] Update no-floating-promises lint rule docs page (#36913) Small docs fix. We've got a snazzy new website at typescript-eslint.io. Eventually the .md docs pages will serve just as partial docs sources, not the right URL to visit. --- docs/api-reference/next/router.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-reference/next/router.md b/docs/api-reference/next/router.md index 98a2330386c20..ac0ba94ab4ce6 100644 --- a/docs/api-reference/next/router.md +++ b/docs/api-reference/next/router.md @@ -466,7 +466,7 @@ export default function MyApp({ Component, pageProps }) { ## Potential ESLint errors -Certain methods accessible on the `router` object return a Promise. If you have the ESLint rule, [no-floating-promises](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-floating-promises.md) enabled, consider disabling it either globally, or for the affected line. +Certain methods accessible on the `router` object return a Promise. If you have the ESLint rule, [no-floating-promises](https://typescript-eslint.io/rules/no-floating-promises) enabled, consider disabling it either globally, or for the affected line. If your application needs this rule, you should either `void` the promise – or use an `async` function, `await` the Promise, then void the function call. **This is not applicable when the method is called from inside an `onClick` handler**.