diff --git a/lib/linter/linter.js b/lib/linter/linter.js index e67574599bbe..12bf717d96ad 100644 --- a/lib/linter/linter.js +++ b/lib/linter/linter.js @@ -1306,7 +1306,7 @@ class Linter { const text = ensureText(textOrSourceCode); const preprocess = options.preprocess || (rawText => [rawText]); - const postprocess = options.postprocess || Array.prototype.flat.call; + const postprocess = options.postprocess || (messagesList => messagesList.flat()); const filterCodeBlock = options.filterCodeBlock || (blockFilename => blockFilename.endsWith(".js"));