Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: basePath directory can never be ignored #92

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

mdjermanovic
Copy link
Member

Prerequisites checklist

What is the purpose of this pull request?

Fixes a bug in ConfigArray#isDirectoryIgnored().

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.

Related Issues

refs eslint/eslint#18706

Is there anything you'd like reviewers to focus on?

@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Jul 21, 2024
Copy link
Member

@fasttime fasttime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@fasttime fasttime merged commit c94ab2d into main Jul 22, 2024
14 checks passed
@fasttime fasttime deleted the fix-isdirectoryignored-basepath branch July 22, 2024 10:55
@github-actions github-actions bot mentioned this pull request Jul 22, 2024
@nzakas
Copy link
Member

nzakas commented Jul 22, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants