From 2d900306da5e095ba3ae20453d3f858df858f681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=9A=E8=B0=94=E7=9A=84=E7=8C=AB?= Date: Wed, 30 Aug 2017 10:07:54 +0800 Subject: [PATCH] Chore: remove unused assignment. (#9182) --- lib/rules/padded-blocks.js | 4 ++-- lib/rules/prefer-arrow-callback.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/rules/padded-blocks.js b/lib/rules/padded-blocks.js index 64c2c5c72fd..ad65882ac6a 100644 --- a/lib/rules/padded-blocks.js +++ b/lib/rules/padded-blocks.js @@ -111,7 +111,7 @@ module.exports = { * @returns {boolean} Whether or not the token is followed by a blank line. */ function getFirstBlockToken(token) { - let prev = token, + let prev, first = token; do { @@ -129,7 +129,7 @@ module.exports = { */ function getLastBlockToken(token) { let last = token, - next = token; + next; do { next = last; diff --git a/lib/rules/prefer-arrow-callback.js b/lib/rules/prefer-arrow-callback.js index 43a8bb77dec..de7c3394013 100644 --- a/lib/rules/prefer-arrow-callback.js +++ b/lib/rules/prefer-arrow-callback.js @@ -88,7 +88,6 @@ function getCallbackInfo(node) { parent.parent.arguments.length === 1 && parent.parent.arguments[0].type === "ThisExpression" ); - node = parent; parent = parent.parent; } else { return retv;