From a7c455f2aa487cc35b2d945012b7c3902de3a222 Mon Sep 17 00:00:00 2001 From: Mickael Jeanroy Date: Fri, 24 May 2024 00:26:44 +0200 Subject: [PATCH] chore: fix lint task --- scripts/lint/index.js | 9 ++++++--- scripts/release/index.js | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/lint/index.js b/scripts/lint/index.js index 8c0b7b3b..796997fd 100644 --- a/scripts/lint/index.js +++ b/scripts/lint/index.js @@ -62,9 +62,12 @@ module.exports = function lint() { const loadFormatter = eslint.loadFormatter('stylish'); return Promise.all([lintFiles, loadFormatter]).then(([results, formatter]) => { - if (results.errorCount > 0 || results.warningCount > 0) { - fancyLog(formatter.format(results)); - throw new Error('ESLintError'); + for (let i = 0; i < results.length; i++) { + const lintResult = results[i]; + if (lintResult.warningCount > 0 || lintResult.errorCount > 0 || lintResult.fatalErrorCount > 0) { + fancyLog(formatter.format(results)); + throw new Error('ESLintError'); + } } }); }; diff --git a/scripts/release/index.js b/scripts/release/index.js index ea461912..786fd92e 100644 --- a/scripts/release/index.js +++ b/scripts/release/index.js @@ -86,8 +86,8 @@ function createReleaseTask(level) { } return gulp.series( - doRelease, - prepareNextRelease + doRelease, + prepareNextRelease, ); }