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
Update Prettier to 1.19.x and implement XML support #104
Comments
@muenzpraeger I just tried that and the outcome is not so good. |
Please assess the reason of deployment errors, and raise issues accordingly to the team. |
Found a first issue that could be the source: prettier introduces line breaks in tag content and our Metadata API doesn't like that for certain types like booleans. Example in <referrerPolicyOriginWhenCrossOrigin>true</referrerPolicyOriginWhenCrossOrigin> is prettified to: <referrerPolicyOriginWhenCrossOrigin>
true
</referrerPolicyOriginWhenCrossOrigin> This causes the following error when pushing source (scroll right to see the error message):
I assume that values are not trimmed when parsed by our Metadata API backend. |
There's no Prettier rule to prevent that from happening in XML so the only option would be to ask the Metadata API team to change their parsing code. TBH I'm not willing to dedicate more energy to this because these files are auto generated and should generally not be hand edited. |
I opened a bug on that repo. Ignoring the files is not an option, we should work with the plugin author to resolve these kinds of issues. |
Ok, sorry, I thought that you wanted to change things on the metadata API parser. |
Prettier xml plugin bug is now fixed. PR #108 is updated with the new plugin version and it works fine. |
What is missing from the application? Please describe.
XML formatting is currently not enforced.
Describe the solution you'd like
With Prettier 1.19.x and forward XML support got added. For that the Pretter XML Plugin needs to be added as dev dependency, and the scripts need to be updated.
The text was updated successfully, but these errors were encountered: