Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Docs: Add comments to code block in example (#13089)
  • Loading branch information
bumkeyy committed Mar 25, 2020
1 parent ee1f053 commit 6c069f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/rules/no-compare-neg-zero.md
Expand Up @@ -7,6 +7,7 @@ The rule should warn against code that tries to compare against -0, since that w
Examples of **incorrect** code for this rule:

```js
/* eslint no-compare-neg-zero: "error" */

if (x === -0) {
// doSomething()...
Expand All @@ -16,13 +17,15 @@ if (x === -0) {
Examples of **correct** code for this rule:

```js
/* eslint no-compare-neg-zero: "error" */

if (x === 0) {
// doSomething()...
}
```

```js
/* eslint no-compare-neg-zero: "error" */

if (Object.is(x, -0)) {
// doSomething()...
Expand Down

0 comments on commit 6c069f9

Please sign in to comment.