From b09fc7c21c03fdb3a5469fb1e12647d5c623b8ff Mon Sep 17 00:00:00 2001 From: David Anson Date: Wed, 15 Nov 2023 20:58:51 -0800 Subject: [PATCH] Remove private noErrors parameter to main entry point, hardcode "true" behavior. --- markdownlint-cli2.js | 9 +-------- test/markdownlint-cli2-test.js | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/markdownlint-cli2.js b/markdownlint-cli2.js index 59b6f126..5f87163a 100755 --- a/markdownlint-cli2.js +++ b/markdownlint-cli2.js @@ -473,7 +473,6 @@ const enumerateFiles = async ( baseDir, globPatterns, dirToDirInfo, - noErrors, noRequire ) => { const tasks = []; @@ -482,11 +481,9 @@ const enumerateFiles = async ( "cwd": baseDir, "dot": true, "expandDirectories": false, + "suppressErrors": true, fs }; - if (noErrors) { - globbyOptions.suppressErrors = true; - } // Special-case literal files const literalFiles = []; const filteredGlobPatterns = globPatterns.filter( @@ -608,7 +605,6 @@ const createDirInfos = async ( globPatterns, dirToDirInfo, optionsOverride, - noErrors, noRequire ) => { await enumerateFiles( @@ -617,7 +613,6 @@ const createDirInfos = async ( baseDir, globPatterns, dirToDirInfo, - noErrors, noRequire ); await enumerateParents( @@ -898,7 +893,6 @@ const main = async (params) => { optionsOverride, fileContents, nonFileContents, - noErrors, noGlobs, noRequire, name @@ -989,7 +983,6 @@ const main = async (params) => { globPatterns, dirToDirInfo, optionsOverride, - noErrors, noRequire ); // Output linting status diff --git a/test/markdownlint-cli2-test.js b/test/markdownlint-cli2-test.js index 1485808a..b9feb8ee 100644 --- a/test/markdownlint-cli2-test.js +++ b/test/markdownlint-cli2-test.js @@ -475,8 +475,7 @@ test("custom fs, extension scenario with exception", (t) => { "stat": null, "readdir": null, "readFile": null - }, - "noErrors": true + } }). then((exitCode) => { t.is(exitCode, 0);