summaryrefslogtreecommitdiff
path: root/tools/eslint/lib/rules/no-mixed-spaces-and-tabs.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-07-07 15:44:32 -0700
committerRich Trott <rtrott@gmail.com>2016-07-11 13:47:20 -0700
commite8a7003e940928e2d1684c12881dd2a39af2d7cc (patch)
tree92264eb4c317b287366e7774f6d4e15000856e06 /tools/eslint/lib/rules/no-mixed-spaces-and-tabs.js
parentfcae5e2d9187b4a9c16cbce843c10e2087990946 (diff)
downloadnode-new-e8a7003e940928e2d1684c12881dd2a39af2d7cc.tar.gz
tools: update ESLint, fix unused vars bug
Update ESLint to 3.0.0. This includes an enhancement to `no-unused-vars` such that it finds a few instances in our code base that it did not find previously (fixed in previous commits readying this for landing). PR-URL: https://github.com/nodejs/node/pull/7601 Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'tools/eslint/lib/rules/no-mixed-spaces-and-tabs.js')
-rw-r--r--tools/eslint/lib/rules/no-mixed-spaces-and-tabs.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/eslint/lib/rules/no-mixed-spaces-and-tabs.js b/tools/eslint/lib/rules/no-mixed-spaces-and-tabs.js
index b3cdd38a60..74553f6511 100644
--- a/tools/eslint/lib/rules/no-mixed-spaces-and-tabs.js
+++ b/tools/eslint/lib/rules/no-mixed-spaces-and-tabs.js
@@ -24,6 +24,7 @@ module.exports = {
},
create: function(context) {
+ var sourceCode = context.getSourceCode();
var smartTabs,
ignoredLocs = [];
@@ -86,8 +87,8 @@ module.exports = {
*/
var regex = /^(?=[\t ]*(\t | \t))/,
match,
- lines = context.getSourceLines(),
- comments = context.getAllComments();
+ lines = sourceCode.lines,
+ comments = sourceCode.getAllComments();
comments.forEach(function(comment) {
ignoredLocs.push(comment.loc);