From b9244ae974355d1b5eac8cfd082b8106d585bbdf Mon Sep 17 00:00:00 2001 From: Robat Williams Date: Fri, 6 Jan 2023 18:17:45 +0000 Subject: [PATCH] Fix wrong error summary and exit code reported fixes #53 --- packages/check-es-compat/bin/cli.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/check-es-compat/bin/cli.mjs b/packages/check-es-compat/bin/cli.mjs index 11a6e31..25c53f5 100644 --- a/packages/check-es-compat/bin/cli.mjs +++ b/packages/check-es-compat/bin/cli.mjs @@ -44,5 +44,5 @@ async function execute(files) { const formatter = await eslint.loadFormatter(); console.log(formatter.format(results)); - return { hasErrors: results.errorCount > 0 }; + return { hasErrors: results.some((result) => result.errorCount > 0) }; }