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);