From 089f66a7cfdf1107c9ba8a845231e24126b9ce74 Mon Sep 17 00:00:00 2001 From: Daan Leenders Date: Wed, 22 Sep 2021 13:54:30 +0200 Subject: [PATCH] An annotation title should never be null Github will reject an update with an annotation in it who's title is `null`. It can happen that the eslint rule id is null when you have hit an error before any rules can be run (like a parse error). --- src/githubChecksFormatter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/githubChecksFormatter.js b/src/githubChecksFormatter.js index 4ff2ef9..d009a02 100644 --- a/src/githubChecksFormatter.js +++ b/src/githubChecksFormatter.js @@ -39,7 +39,7 @@ function annotationsForResults(results) { ? annotationLevel.WARNING : annotationLevel.FAILURE, message: message.message, - title: message.ruleId, + title: message.ruleId || "Eslint fatal error", }; annotations.push(annotation);