From e313c0286b1c1a7267516a7b2b4c01fa76c71ec0 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 6 Aug 2016 12:11:02 -0700 Subject: tools: update to ESLint 3.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/7999 Reviewed-By: Colin Ihrig Reviewed-By: Roman Reiss Reviewed-By: James M Snell Reviewed-By: Johan Bergström --- tools/eslint/lib/rules/no-empty-function.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'tools/eslint/lib/rules/no-empty-function.js') diff --git a/tools/eslint/lib/rules/no-empty-function.js b/tools/eslint/lib/rules/no-empty-function.js index 0102acff51..d7d8c2e886 100644 --- a/tools/eslint/lib/rules/no-empty-function.js +++ b/tools/eslint/lib/rules/no-empty-function.js @@ -9,7 +9,7 @@ // Helpers //------------------------------------------------------------------------------ -var ALLOW_OPTIONS = Object.freeze([ +let ALLOW_OPTIONS = Object.freeze([ "functions", "arrowFunctions", "generatorFunctions", @@ -19,7 +19,7 @@ var ALLOW_OPTIONS = Object.freeze([ "setters", "constructors" ]); -var SHOW_KIND = Object.freeze({ +let SHOW_KIND = Object.freeze({ functions: "function", arrowFunctions: "arrow function", generatorFunctions: "generator function", @@ -44,8 +44,8 @@ var SHOW_KIND = Object.freeze({ * "constructors". */ function getKind(node) { - var parent = node.parent; - var kind = ""; + let parent = node.parent; + let kind = ""; if (node.type === "ArrowFunctionExpression") { return "arrowFunctions"; @@ -78,7 +78,7 @@ function getKind(node) { } // Detects prefix. - var prefix = ""; + let prefix = ""; if (node.generator) { prefix = "generator"; @@ -118,10 +118,10 @@ module.exports = { }, create: function(context) { - var options = context.options[0] || {}; - var allowed = options.allow || []; + let options = context.options[0] || {}; + let allowed = options.allow || []; - var sourceCode = context.getSourceCode(); + let sourceCode = context.getSourceCode(); /** * Reports a given function node if the node matches the following patterns. @@ -136,7 +136,7 @@ module.exports = { * @returns {void} */ function reportIfEmpty(node) { - var kind = getKind(node); + let kind = getKind(node); if (allowed.indexOf(kind) === -1 && node.body.type === "BlockStatement" && -- cgit v1.2.1