Skip to content

Commit

Permalink
docs: Add function call example for no-undefined (#16712)
Browse files Browse the repository at this point in the history
* 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  <amareshsm13@gmail.com>

* Update docs/src/rules/no-undefined.md

thx for the spelling fixes

Co-authored-by: Amaresh  S M  <amareshsm13@gmail.com>

* 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  <amareshsm13@gmail.com>
  • Loading branch information
elliot-huffman and amareshsm committed Dec 27, 2022
1 parent a3262f0 commit e5ecfef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/src/rules/no-undefined.md
Expand Up @@ -57,6 +57,8 @@ if (foo === undefined) {
function foo(undefined) {
// ...
}

bar(undefined, "lorem");
```

:::
Expand All @@ -77,6 +79,8 @@ if (typeof foo === "undefined") {
}

global.undefined = "foo";

bar(void 0, "lorem");
```

:::
Expand Down

0 comments on commit e5ecfef

Please sign in to comment.