Open acls opened 8 months ago
With the option svelteSortOrder: 'none', in my .prettierrc.js file, the script and style tags are removed when they are the last element in the file.
svelteSortOrder: 'none',
.prettierrc.js
This file:
<div></div> <style></style> <script></script>
will be formatted to:
<div></div> <style></style>
and formatting it again it will become:
<div></div>
But those tags won't be removed when the markup is at the end, so when this file is formatted it stays the same:
<style></style> <script></script> <div></div>
The same bug here. I think that preventing a formatter from completely removing source code should be a priority. Honestly svelteSortOrder none is useless as long as this bug stays unfixed.
With the option
svelteSortOrder: 'none',
in my.prettierrc.js
file, the script and style tags are removed when they are the last element in the file.This file:
will be formatted to:
and formatting it again it will become:
But those tags won't be removed when the markup is at the end, so when this file is formatted it stays the same: