prettier / plugin-xml

Prettier XML plugin
MIT License
234 stars 33 forks source link

Please include option not to auto-self-close empty nodes #793

Open dschach opened 5 months ago

dschach commented 5 months ago

There are some situations (Salesforce metadata) where the metadata should not self-close:

This is the desired XML:

<searchLayouts></searchLayouts>

but the plugin auto-closes it to

<searchLayouts/>

I realize that maybe this isn't a best practice, but it is causing a ton of changes in our VCS that we'd rather not have to deal with, and it clutters IDEs until the commit is cleaned with Husky and Prettier.

Could we please have a boolean to prevent this kind of cleanup?