diff options
author | Rich Trott <rtrott@gmail.com> | 2016-08-13 15:06:43 -0700 |
---|---|---|
committer | Evan Lucas <evanlucas@me.com> | 2016-08-20 10:00:31 -0500 |
commit | cdcf23ab7f111c4ae531192d2eaa6045778965bc (patch) | |
tree | 5782d53c16ead52396b58826afe340448fb6ca6b /tools/eslint/lib/rules/no-script-url.js | |
parent | be41f584f3e6a5b7ec342984dc5152717b6eb600 (diff) | |
download | node-new-cdcf23ab7f111c4ae531192d2eaa6045778965bc.tar.gz |
tools: update ESLint to 3.3.0 and enable rules
Update ESLint 3.3.0 and update .eslintrc:
* replace deprecated no-negated-in-lhs rule with no-unsafe-negation
* http://eslint.org/docs/rules/no-negated-in-lhs
* http://eslint.org/docs/rules/no-unsafe-negation
* enable no-template-curly-in-string
* http://eslint.org/docs/rules/no-template-curly-in-string
* enable no-global-assign
* http://eslint.org/docs/rules/no-global-assign
* enable func-call-spacing
* http://eslint.org/docs/rules/func-call-spacing
PR-URL: https://github.com/nodejs/node/pull/8097
Reviewed-By: targos - Michaƫl Zasso <mic.besace@gmail.com>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'tools/eslint/lib/rules/no-script-url.js')
-rw-r--r-- | tools/eslint/lib/rules/no-script-url.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/eslint/lib/rules/no-script-url.js b/tools/eslint/lib/rules/no-script-url.js index 1c12490b43..0d767bbd1e 100644 --- a/tools/eslint/lib/rules/no-script-url.js +++ b/tools/eslint/lib/rules/no-script-url.js @@ -27,11 +27,8 @@ module.exports = { return { Literal: function(node) { - - let value; - if (node.value && typeof node.value === "string") { - value = node.value.toLowerCase(); + const value = node.value.toLowerCase(); if (value.indexOf("javascript:") === 0) { context.report(node, "Script URL is a form of eval."); |