Hmm I just had a (perhaps esoteric) issue in an Astro file. Specifying
<!-- prettier-ignore -->
above a <div> would cause the <style> block at the bottom to become duplicated on save.
Weird as, and I couldn’t be bothered troubleshooting, I just added the file to .prettierignore. But still.