diff --git a/dist/index.js b/dist/index.js index f334c84..d4d990a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5811,7 +5811,9 @@ async function runEslint () { core.debug(`Raw report from eslint: ${JSON.stringify(report, null, 2)}`) - const { results, errorCount, warningCount } = report + const { results } = report + let errorCount = 0 + let warningCount = 0 const levels = ['', 'warning', 'failure'] @@ -5837,6 +5839,8 @@ async function runEslint () { if (!changeRanges.some(r => r.doesInclude(line))) continue + errorCount += msg.errorCount + warningCount += msg.warningCount const annotationLevel = levels[severity] annotations.push({ path, diff --git a/src/main.js b/src/main.js index 6d1e761..ee6e1ab 100644 --- a/src/main.js +++ b/src/main.js @@ -118,7 +118,9 @@ async function runEslint () { core.debug(`Raw report from eslint: ${JSON.stringify(report, null, 2)}`) - const { results, errorCount, warningCount } = report + const { results } = report + let errorCount = 0 + let warningCount = 0 const levels = ['', 'warning', 'failure'] @@ -144,6 +146,8 @@ async function runEslint () { if (!changeRanges.some(r => r.doesInclude(line))) continue + errorCount += msg.errorCount + warningCount += msg.warningCount const annotationLevel = levels[severity] annotations.push({ path,