-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Prevent errors when pattern doesn't match any files #8233
Comments
Duplicate of #8136 |
@evilebottnawi I don't think this is a #8136 duplicate. This is about having a pattern like |
Oh yes, sorry, my mistake |
Just a quick workaround for some who run into this issue when running something like |
@NickdeK Thx. The workaround is kind of working, as long as you have at least one file matching the expression. 👍 |
Environments:
Steps to reproduce:
prettier ".unknown"
Expected behavior:
Have a flag in the prettier CLI just like
--no-error-on-unmatched-pattern
like ESLint. So that if we run the CLI on a bunch of projects in our monorepo, it will skip those that have no relevant files (such as assets with only image files). Instead of breaking on those projects and killing the CI.Actual behavior:
No such flag is currently present in the Prettier CLI, meaning we have to build a hack to circumvent this error.
The text was updated successfully, but these errors were encountered: