Skip to content

Commit

Permalink
Add another test
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Oct 4, 2022
1 parent f0d3a6d commit 04c7339
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/fixtures/ignores-self/eslint.config.js
@@ -0,0 +1,3 @@
module.exports = {
ignores: ["**/ignores-self/**"]
};
15 changes: 15 additions & 0 deletions tests/lib/eslint/flat-eslint.js
Expand Up @@ -1144,6 +1144,21 @@ describe("FlatESLint", () => {

});

// https://github.com/eslint/eslint/issues/16340
it("should lint files even when cwd directory name matches ignores pattern", async () => {
eslint = new FlatESLint({
cwd: getFixturePath("ignores-self")
});

const results = await eslint.lintFiles(["*.js"]);

assert.strictEqual(results.length, 1);
assert.strictEqual(results[0].filePath, getFixturePath("ignores-self/eslint.config.js"));
assert.strictEqual(results[0].errorCount, 0);
assert.strictEqual(results[0].warningCount, 0);

});


});

Expand Down

0 comments on commit 04c7339

Please sign in to comment.