When basePath directory is passed in as the directoryPath to check, isDirectoryIgnored() mistakenly checks / against ignore patterns. Then it can match, and thus return true, patterns like / (which should be no-op/invalid as an absolute path pattern) or ** (which is valid but should not match the basePath directory).
What changes did you make? (Give an overview)
Fixed isDirectoryIgnored() to always return false for the basePath directory.
Just a reminder, we shouldn't be merging PRs that are opened over the weekend during the weekend. We need to give others a chance to review even if they're not online. (ref: when to merge)
Prerequisites checklist
What is the purpose of this pull request?
Fixes a bug in
ConfigArray#isDirectoryIgnored()
.When
basePath
directory is passed in as thedirectoryPath
to check,isDirectoryIgnored()
mistakenly checks/
against ignore patterns. Then it can match, and thus returntrue
, patterns like/
(which should be no-op/invalid as an absolute path pattern) or**
(which is valid but should not match thebasePath
directory).What changes did you make? (Give an overview)
Fixed
isDirectoryIgnored()
to always returnfalse
for thebasePath
directory.Related Issues
refs https://github.com/eslint/eslint/issues/18706
Is there anything you'd like reviewers to focus on?