diff options
author | Rich Trott <rtrott@gmail.com> | 2016-08-06 12:11:02 -0700 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2016-08-10 13:04:27 -0400 |
commit | 60ff991c09d61d760e38af5899b5fec3e6a38ee9 (patch) | |
tree | cd9762d9851984326b61ac3ec27083ea60897286 /tools/eslint/lib/rules/no-invalid-this.js | |
parent | 4a8b8048f274eba6ee6283f89d0effac16f59c56 (diff) | |
download | node-new-60ff991c09d61d760e38af5899b5fec3e6a38ee9.tar.gz |
tools: update to ESLint 3.2.2
PR-URL: https://github.com/nodejs/node/pull/7999
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Diffstat (limited to 'tools/eslint/lib/rules/no-invalid-this.js')
-rw-r--r-- | tools/eslint/lib/rules/no-invalid-this.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/eslint/lib/rules/no-invalid-this.js b/tools/eslint/lib/rules/no-invalid-this.js index 198bfd706a..e41c474699 100644 --- a/tools/eslint/lib/rules/no-invalid-this.js +++ b/tools/eslint/lib/rules/no-invalid-this.js @@ -9,7 +9,7 @@ // Requirements //------------------------------------------------------------------------------ -var astUtils = require("../ast-utils"); +let astUtils = require("../ast-utils"); //------------------------------------------------------------------------------ // Rule Definition @@ -27,7 +27,7 @@ module.exports = { }, create: function(context) { - var stack = [], + let stack = [], sourceCode = context.getSourceCode(); /** @@ -40,7 +40,7 @@ module.exports = { * an object which has a flag that whether or not `this` keyword is valid. */ stack.getCurrent = function() { - var current = this[this.length - 1]; + let current = this[this.length - 1]; if (!current.init) { current.init = true; @@ -86,7 +86,7 @@ module.exports = { * Modules is always strict mode. */ Program: function(node) { - var scope = context.getScope(), + let scope = context.getScope(), features = context.parserOptions.ecmaFeatures || {}; stack.push({ @@ -111,7 +111,7 @@ module.exports = { // Reports if `this` of the current context is invalid. ThisExpression: function(node) { - var current = stack.getCurrent(); + let current = stack.getCurrent(); if (current && !current.valid) { context.report(node, "Unexpected 'this'."); |