From 6c069f907a04268b671c7f949c04a508df9d42a3 Mon Sep 17 00:00:00 2001 From: Kibeom Kwon Date: Thu, 26 Mar 2020 03:22:37 +0900 Subject: [PATCH] Docs: Add comments to code block in example (#13089) --- docs/rules/no-compare-neg-zero.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/rules/no-compare-neg-zero.md b/docs/rules/no-compare-neg-zero.md index 64afadfe8a2..e9de786e8cd 100644 --- a/docs/rules/no-compare-neg-zero.md +++ b/docs/rules/no-compare-neg-zero.md @@ -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()... @@ -16,6 +17,7 @@ if (x === -0) { Examples of **correct** code for this rule: ```js +/* eslint no-compare-neg-zero: "error" */ if (x === 0) { // doSomething()... @@ -23,6 +25,7 @@ if (x === 0) { ``` ```js +/* eslint no-compare-neg-zero: "error" */ if (Object.is(x, -0)) { // doSomething()...