Closed mustafa0x closed 3 months ago
The Svelte plugin uses its own parser, which has (or had) some support for void tags: https://github.com/sveltejs/prettier-plugin-svelte/blob/master/src/lib/elements.ts#L4-L19
Looking at the history of that repository, there is a lot of back-and-forth and partially implemented code around that feature. This is probably something the author of prettier-plugin-svelte
could better address.
Thank you for your interest in this project!
As @crisvp explained, support for languages other than HTML (including Svelte) is implemented with entirely different parsers. This project currently supports HTML, only. I can probably do a better job of clarifying that in the project README.
Please let me know how it goes with prettier-plugin-svelte
. That is probably the best home for this feature request. But if that project is unwilling and there is enough interest, maybe we can reconsider (I have also heard some interest for supporting Vue).
For now, closing this issue.
Would love to use this with svelte files!
prettier.config.js