From 193468667b84b416cd5c5a9f42bc34deedae858e Mon Sep 17 00:00:00 2001 From: Michaƫl Zasso Date: Sun, 19 Feb 2017 13:45:30 +0100 Subject: tools: enable one-var-declaration-per-line ESLint rule This rule enforces new lines around variable declarations. It is configured to spot only variables that are initialized. PR-URL: https://github.com/nodejs/node/pull/11462 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Yuta Hiroto Reviewed-By: Gibson Fahnestock Reviewed-By: Luigi Pinca --- benchmark/es/destructuring-bench.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'benchmark/es') diff --git a/benchmark/es/destructuring-bench.js b/benchmark/es/destructuring-bench.js index 0e9b5e93f3..3288e009a0 100644 --- a/benchmark/es/destructuring-bench.js +++ b/benchmark/es/destructuring-bench.js @@ -9,9 +9,9 @@ const bench = common.createBenchmark(main, { }); function runSwapManual(n) { - var i = 0, x, y, r; + var x, y, r; bench.start(); - for (; i < n; i++) { + for (var i = 0; i < n; i++) { x = 1, y = 2; r = x; x = y; @@ -23,9 +23,9 @@ function runSwapManual(n) { } function runSwapDestructured(n) { - var i = 0, x, y; + var x, y; bench.start(); - for (; i < n; i++) { + for (var i = 0; i < n; i++) { x = 1, y = 2; [x, y] = [y, x]; assert.strictEqual(x, 2); -- cgit v1.2.3