fix: enable eslint-config-flat-gitignore
even if .gitignore
is not in cwd
#547
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In a monorepo, you may only have a single
.gitignore
at the root of the repo, but run the eslint from within package subdirectories. In this scenario,@antfu/eslint-config
doesn't currently add gitignore entries to the eslint ignores.This PR enables
eslint-config-flat-gitignore
even if a.gitignore
is not present in the current directory, as it hasfind-up-simple
to look for a.gitignore
in a higher directory.I've set
{ strict: false }
so that it doesn't error if it can't find a.gitignore
file at all.Linked Issues
Fixes #544
Additional context