From 2506ab5f396e5f3466485e52739937b662a6cb42 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Wed, 27 Mar 2019 00:23:31 +0800 Subject: benchmark: tidy up eslint ignore in foreach-bench.js PR-URL: https://github.com/nodejs/node/pull/26925 Reviewed-By: Ruben Bridgewater Reviewed-By: Rich Trott --- benchmark/es/foreach-bench.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/benchmark/es/foreach-bench.js b/benchmark/es/foreach-bench.js index 25ea97b44d..f424ca7a25 100644 --- a/benchmark/es/foreach-bench.js +++ b/benchmark/es/foreach-bench.js @@ -12,19 +12,18 @@ function useFor(n, items, count) { bench.start(); for (var i = 0; i < n; i++) { for (var j = 0; j < count; j++) { - /* eslint-disable no-unused-vars */ + // eslint-disable-next-line no-unused-vars const item = items[j]; - /* esline-enable no-unused-vars */ } } bench.end(n); } function useForOf(n, items) { - var item; bench.start(); for (var i = 0; i < n; i++) { - for (item of items) {} + // eslint-disable-next-line no-unused-vars + for (const item of items) {} } bench.end(n); } @@ -33,9 +32,8 @@ function useForIn(n, items) { bench.start(); for (var i = 0; i < n; i++) { for (var j in items) { - /* eslint-disable no-unused-vars */ + // eslint-disable-next-line no-unused-vars const item = items[j]; - /* esline-enable no-unused-vars */ } } bench.end(n); -- cgit v1.2.3