From 25ff62a681277ea1aabd0f8f049e1c5327b5cf96 Mon Sep 17 00:00:00 2001 From: "Nicholas C. Zakas" Date: Thu, 14 Dec 2023 13:21:03 -0500 Subject: [PATCH] lintFiles() should not have default param --- lib/eslint/flat-eslint.js | 4 ++-- tests/lib/eslint/flat-eslint.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/eslint/flat-eslint.js b/lib/eslint/flat-eslint.js index ae7717fe09c..9f1d04b1df1 100644 --- a/lib/eslint/flat-eslint.js +++ b/lib/eslint/flat-eslint.js @@ -736,10 +736,10 @@ class FlatESLint { /** * Executes the current configuration on an array of file and directory names. - * @param {string|string[]} [patterns=["."]] An array of file and directory names. + * @param {string|string[]} patterns An array of file and directory names. * @returns {Promise} The results of linting the file patterns given. */ - async lintFiles(patterns = ["."]) { + async lintFiles(patterns) { let normalizedPatterns = patterns; const { diff --git a/tests/lib/eslint/flat-eslint.js b/tests/lib/eslint/flat-eslint.js index 7fe9d01be44..34c8e6bd103 100644 --- a/tests/lib/eslint/flat-eslint.js +++ b/tests/lib/eslint/flat-eslint.js @@ -965,8 +965,8 @@ describe("FlatESLint", () => { [ ["a string with a single space", " "], ["an array with one empty string", [""]], - ["an array with two empty strings", ["", ""]] - + ["an array with two empty strings", ["", ""]], + ["undefined", void 0] ].forEach(([name, value]) => { it(`should throw an error when passed ${name}`, async () => {