From 30d1048bc36bd84aa00c160508ae67a7a641024a Mon Sep 17 00:00:00 2001 From: Kirk Waiblinger Date: Sat, 7 Sep 2024 13:07:07 -0600 Subject: [PATCH 1/2] add link to void operator --- packages/eslint-plugin/docs/rules/no-floating-promises.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/no-floating-promises.mdx b/packages/eslint-plugin/docs/rules/no-floating-promises.mdx index 18a84c2e0240..ff4d3b2a6443 100644 --- a/packages/eslint-plugin/docs/rules/no-floating-promises.mdx +++ b/packages/eslint-plugin/docs/rules/no-floating-promises.mdx @@ -131,7 +131,7 @@ await createMyThenable(); ### `ignoreVoid` -This option, which is `true` by default, allows you to stop the rule reporting promises consumed with void operator. +This option, which is `true` by default, allows you to stop the rule reporting promises consumed with the [void operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void). This can be a good way to explicitly mark a promise as intentionally not awaited. Examples of **correct** code for this rule with `{ ignoreVoid: true }`: From fde4920f8a8f7b92f2ab94b4c0c29bfa513618af Mon Sep 17 00:00:00 2001 From: Kirk Waiblinger Date: Sat, 7 Sep 2024 19:38:45 -0600 Subject: [PATCH 2/2] Update packages/eslint-plugin/docs/rules/no-floating-promises.mdx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Josh Goldberg ✨ --- packages/eslint-plugin/docs/rules/no-floating-promises.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/no-floating-promises.mdx b/packages/eslint-plugin/docs/rules/no-floating-promises.mdx index ff4d3b2a6443..00deb4edc979 100644 --- a/packages/eslint-plugin/docs/rules/no-floating-promises.mdx +++ b/packages/eslint-plugin/docs/rules/no-floating-promises.mdx @@ -131,7 +131,7 @@ await createMyThenable(); ### `ignoreVoid` -This option, which is `true` by default, allows you to stop the rule reporting promises consumed with the [void operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void). +This option, which is `true` by default, allows you to stop the rule reporting promises consumed with the [`void` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void). This can be a good way to explicitly mark a promise as intentionally not awaited. Examples of **correct** code for this rule with `{ ignoreVoid: true }`: