From e5ecfefa1c952195a3a8371f5953cc655d844079 Mon Sep 17 00:00:00 2001 From: Elliot Huffman Date: Tue, 27 Dec 2022 06:48:37 -0500 Subject: [PATCH] docs: Add function call example for no-undefined (#16712) * docs: Add Function Call Example Add a function call example on how to skip parameters the safe way * Update docs/src/rules/no-undefined.md thx for the spelling fixes Co-authored-by: Amaresh S M * Update docs/src/rules/no-undefined.md thx for the spelling fixes Co-authored-by: Amaresh S M * Remove Function Def Remove the function definition to reduce docs complexity. * Simplify wording Simplify the wording of the comments. * No comments it is after much deliberation, the committee has decreed that there shall be no comments on the new examples! Co-authored-by: Amaresh S M --- docs/src/rules/no-undefined.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/src/rules/no-undefined.md b/docs/src/rules/no-undefined.md index fa089974239..9b0be204b2f 100644 --- a/docs/src/rules/no-undefined.md +++ b/docs/src/rules/no-undefined.md @@ -57,6 +57,8 @@ if (foo === undefined) { function foo(undefined) { // ... } + +bar(undefined, "lorem"); ``` ::: @@ -77,6 +79,8 @@ if (typeof foo === "undefined") { } global.undefined = "foo"; + +bar(void 0, "lorem"); ``` :::