diff options
author | silverwind <me@silverwind.io> | 2016-04-09 14:11:01 +0200 |
---|---|---|
committer | silverwind <me@silverwind.io> | 2016-04-10 11:46:08 +0200 |
commit | 2f6ff1bb64ac4f3e201039c8e83f8eb95f73c769 (patch) | |
tree | 710fe0778ca523281965244fdca60c4a031980e6 /tools/eslint/lib/rules/no-extra-boolean-cast.js | |
parent | 8f4fdc93f07a06a62d4f867c6e0fd2f6287bb8be (diff) | |
download | node-new-2f6ff1bb64ac4f3e201039c8e83f8eb95f73c769.tar.gz |
tools: update ESLint to 2.7.0
PR-URL: https://github.com/nodejs/node/pull/6132
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: thefourtheye <thechargingvolcano@gmail.com>
Diffstat (limited to 'tools/eslint/lib/rules/no-extra-boolean-cast.js')
-rw-r--r-- | tools/eslint/lib/rules/no-extra-boolean-cast.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/eslint/lib/rules/no-extra-boolean-cast.js b/tools/eslint/lib/rules/no-extra-boolean-cast.js index bd7495b891..c7ee1adc6b 100644 --- a/tools/eslint/lib/rules/no-extra-boolean-cast.js +++ b/tools/eslint/lib/rules/no-extra-boolean-cast.js @@ -31,6 +31,7 @@ module.exports = function(context) { return ( (BOOLEAN_NODE_TYPES.indexOf(parent.type) !== -1 && node === parent.test) || + // !<bool> (parent.type === "UnaryExpression" && parent.operator === "!") @@ -52,6 +53,7 @@ module.exports = function(context) { } if (isInBooleanContext(parent, grandparent) || + // Boolean(<bool>) and new Boolean(<bool>) ((grandparent.type === "CallExpression" || grandparent.type === "NewExpression") && grandparent.callee.type === "Identifier" && |