From 2345323f0d93feecb3fde3b9b7894ba835ceb47a Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 13 Feb 2020 17:35:42 -0500 Subject: [PATCH] lint compliance --- lib/plan.js | 4 ++-- scripts/tests/test-plan.js | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/plan.js b/lib/plan.js index 28a917525..a7dbb4ec8 100644 --- a/lib/plan.js +++ b/lib/plan.js @@ -128,7 +128,7 @@ module.exports = function (max) { // run as many new jobs as are allowed. var next = function () { // array.some skips over bare indexes in sparse arrays - var pending = jobs.some(function (bag, priority) { + var pending = jobs.some(function (bag /*, priority*/) { if (!bag || typeof(bag) !== 'object') { return; } // a bag is a map of jobs for any particular degree of priority // iterate over jobs in the bag until you're out of 'workers' @@ -202,7 +202,7 @@ module.exports = function (max) { }; var started = false; - var start = plan.start = function () { + plan.start = function () { // don't allow multiple starts // even though it should work, it's simpler not to. if (started) { return plan; } diff --git a/scripts/tests/test-plan.js b/scripts/tests/test-plan.js index d13a9821c..e8624514a 100644 --- a/scripts/tests/test-plan.js +++ b/scripts/tests/test-plan.js @@ -1,3 +1,4 @@ +/*jshint esversion: 6 */ const Plan = require("../../lib/plan"); var rand_delay = function (f) { @@ -5,7 +6,7 @@ var rand_delay = function (f) { }; var plan = Plan(6).job(1, function (next) { - [1,2,3,4,5,6,7,8,9,10,11,12].forEach(function (n, i) { + [1,2,3,4,5,6,7,8,9,10,11,12].forEach(function (n) { plan.job(0, function (next) { rand_delay(function () { console.log("finishing job %s", n); @@ -23,7 +24,7 @@ var plan = Plan(6).job(1, function (next) { 200, 300, 400 - ].forEach(function (n, i) { + ].forEach(function (n) { plan.job(3, function (next) { rand_delay(function () { console.log("finishing job %s", n);