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

🏗️ Ignore .babel-cache directory #33449

Merged
merged 3 commits into from Mar 24, 2021

Conversation

jridgewell
Copy link
Contributor

Also ensure prettier respects its .prettierignore file, which for some reason it ignores when using the API vs the CLI.

Also ensure prettier respects its .prettierignore file, which for some reason it ignores when using the API vs the CLI.
@jridgewell jridgewell requested a review from rsimha March 23, 2021 22:50
// Prettier ignores the `.prettierignore` file when using the API like we
// are. So we need to filter our files down before feeding them to the API.
const ignore = fs.readFileSync('.prettierignore', 'utf8');
const filesToCheck = getFilesToCheck(prettifyGlobs, {dot: true, ignore});
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be passed in separately via a new param called ignoreFile. Directly adding an ignore field to options will pass it in to globby.sync, and I'm not sure the formats match. (This is a single string containing a block of files, which I'm not sure globby.sync knows to parse.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants