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: enable eslint-config-flat-gitignore even if .gitignore is not in cwd #547

Merged
merged 2 commits into from
Jul 17, 2024
Merged

fix: enable eslint-config-flat-gitignore even if .gitignore is not in cwd #547

merged 2 commits into from
Jul 17, 2024

Conversation

lachlancollins
Copy link
Contributor

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 has find-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

Copy link

netlify bot commented Jul 17, 2024

Deploy Preview for melodious-froyo-4871f8 ready!

Name Link
🔨 Latest commit 6403ff3
🔍 Latest deploy log https://app.netlify.com/sites/melodious-froyo-4871f8/deploys/66979299d92d47000816a54f
😎 Deploy Preview https://deploy-preview-547--melodious-froyo-4871f8.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu antfu changed the title fix: Enable eslint-config-flat-gitignore even if .gitignore is not in cwd fix: enable eslint-config-flat-gitignore even if .gitignore is not in cwd Jul 17, 2024
@antfu antfu merged commit c118b46 into antfu:main Jul 17, 2024
8 checks passed
@lachlancollins lachlancollins deleted the gitignore-from-subdirectory branch July 17, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eslint-config-flat-gitignore not enabled in sub-directories of monorepos
2 participants