From b67ea684e74289b424da9a3b7114dd395fca2dff Mon Sep 17 00:00:00 2001 From: Cori Hudson Date: Mon, 26 Sep 2022 15:16:18 -0400 Subject: [PATCH] fix: use es6 in eslint to avoid disabling linting on some lines --- .eslintrc.js | 5 ++++- lib/batch.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 36ff570d..bfde2e0e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,6 @@ module.exports = { - extends: ['scratch', 'scratch/node'] + extends: ['scratch', 'scratch/node'], + env: { + es6: true + } }; diff --git a/lib/batch.js b/lib/batch.js index 110192a4..e9f168c5 100644 --- a/lib/batch.js +++ b/lib/batch.js @@ -8,7 +8,7 @@ exports.batchMap = async (arr, batchSize, func) => { const results = []; for (let i = 0; i < arr.length; i += batchSize) { - const result = await Promise.all( // eslint-disable-line + const result = await Promise.all( arr.slice(i, i + batchSize).map(func) ); results.push(...result);