From 10a5c7839370219c79f44d4206cbd7c28a72bad5 Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Wed, 21 Dec 2022 05:29:48 +0100 Subject: [PATCH] chore: update ignore patterns in `eslint.config.js` (#16678) --- Makefile.js | 2 +- eslint.config.js | 5 ++--- tests/lib/eslint/flat-eslint.js | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile.js b/Makefile.js index 14d2bac003a..f74c8c44e97 100644 --- a/Makefile.js +++ b/Makefile.js @@ -548,7 +548,7 @@ target.lintDocsJS = function([fix = false] = []) { let errors = 0; echo("Validating JavaScript files in the docs directory"); - const lastReturn = exec(`${ESLINT}${fix ? "--fix" : ""} docs/.eleventy.js`); + const lastReturn = exec(`${ESLINT}${fix ? "--fix" : ""} docs`); if (lastReturn.code !== 0) { errors++; diff --git a/eslint.config.js b/eslint.config.js index b90d94c8bd3..befed5adf31 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -82,7 +82,7 @@ module.exports = [ ignores: [ "build/**", "coverage/**", - "docs/**", + "docs/*", "!docs/.eleventy.js", "jsdoc/**", "templates/**", @@ -91,8 +91,7 @@ module.exports = [ "tests/performance/**", "tmp/**", "tools/internal-rules/node_modules/**", - "**/test.js", - "!.eslintrc.js" + "**/test.js" ] }, { diff --git a/tests/lib/eslint/flat-eslint.js b/tests/lib/eslint/flat-eslint.js index c4b54f54fea..0f0b8c1ffd5 100644 --- a/tests/lib/eslint/flat-eslint.js +++ b/tests/lib/eslint/flat-eslint.js @@ -4571,13 +4571,13 @@ describe("FlatESLint", () => { beforeEach(prepare); afterEach(cleanup); - it("'isPathIgnored()' should return 'true' for 'node_modules/foo/index.js'.", async () => { + it("'isPathIgnored()' should return 'false' for 'node_modules/foo/index.js'.", async () => { const engine = new FlatESLint({ cwd: getPath() }); assert.strictEqual(await engine.isPathIgnored("node_modules/foo/index.js"), false); }); - it("'isPathIgnored()' should return 'true' for 'node_modules/foo/.dot.js'.", async () => { + it("'isPathIgnored()' should return 'false' for 'node_modules/foo/.dot.js'.", async () => { const engine = new FlatESLint({ cwd: getPath() }); assert.strictEqual(await engine.isPathIgnored("node_modules/foo/.dot.js"), false);