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

Can we have a CLI flag that allows ignoring .gitignore and/or .prettierignore please? #16226

Closed
U-4-E-A opened this issue Apr 18, 2024 · 2 comments
Labels
area:cli Issues with Prettier's Command Line Interface

Comments

@U-4-E-A
Copy link

U-4-E-A commented Apr 18, 2024

After I build, I want to do a one-time formatting of my dist folder (which is ignored by git). Perhaps a --force flag might be good option? Thanks.

"postbuild": "prettier --write --force \"dist\""

@sosukesuzuki
Copy link
Member

Can you override the --ignore-path option to accomplish what you want to do?
https://prettier.io/docs/en/cli#--ignore-path

@sosukesuzuki sosukesuzuki added status:awaiting response Issues that require answers to questions from maintainers before action can be taken area:cli Issues with Prettier's Command Line Interface labels Apr 30, 2024
@U-4-E-A
Copy link
Author

U-4-E-A commented Apr 30, 2024

Can you override the --ignore-path option to accomplish what you want to do? https://prettier.io/docs/en/cli#--ignore-path

That does indeed work. Thank you!

"prettierDist": "prettier --write --ignore-path '' \"dist\""

@github-actions github-actions bot removed the status:awaiting response Issues that require answers to questions from maintainers before action can be taken label Apr 30, 2024
@U-4-E-A U-4-E-A closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:cli Issues with Prettier's Command Line Interface
Projects
None yet
Development

No branches or pull requests

2 participants