-
Notifications
You must be signed in to change notification settings - Fork 91
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
Improve xml prettyfier #224
Comments
Prettier was always able to load the XML plugin until now. Did something relevant change in that regard? |
Apparently prettier 3 changed module discovery in a way that is incompatible with pre-commit. It's a rabbit hole and this approach is the best I could find |
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
prettier's xml pluggin now supports a much better XML autoformatting mode. See prettier/plugin-xml#138 (comment).
Below are my findings on how to make it work.
You need a
.prettierrc.cjs
instead of.prettierrc.yml
, so prettier can load the plugin even when run from pre-commit:And the pre-commit config needs to be adapted like so:
The text was updated successfully, but these errors were encountered: