From 2e94f3b798229118680b0f1110415c058e978de9 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 12 Dec 2018 12:39:21 -0500 Subject: [PATCH] querystring: remove eslint-disable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the eslint-disable comments by using a strict comparison instead of a Boolean cast. PR-URL: https://github.com/nodejs/node/pull/24995 Reviewed-By: Rich Trott Reviewed-By: Michaël Zasso Reviewed-By: Сковорода Никита Андреевич Reviewed-By: Ruben Bridgewater Reviewed-By: Anto Aravinth --- lib/querystring.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/querystring.js b/lib/querystring.js index 5189a28f235770..5839ca6b0d0d0b 100644 --- a/lib/querystring.js +++ b/lib/querystring.js @@ -318,8 +318,7 @@ function parse(qs, sep, eq, options) { encodeCheck = 1; continue; } else if (encodeCheck > 0) { - // eslint-disable-next-line no-extra-boolean-cast - if (!!isHexTable[code]) { + if (isHexTable[code] === 1) { if (++encodeCheck === 3) keyEncoded = true; continue; @@ -348,8 +347,7 @@ function parse(qs, sep, eq, options) { if (code === 37/* % */) { encodeCheck = 1; } else if (encodeCheck > 0) { - // eslint-disable-next-line no-extra-boolean-cast - if (!!isHexTable[code]) { + if (isHexTable[code] === 1) { if (++encodeCheck === 3) valEncoded = true; } else {