Closed antonioribeiro closed 6 months ago
This is because this plugin is using js-beautify as opposed to prettier to format the HTML/CSS---instead of trying to make js-beautify
look like prettier should probably just use prettier to format
Yeah, if you are building a Prettier plugin, using Prettier to format it is the best option, as this is also the easiest way to be compliant with the Prettier ecosystem. As we are using Prettier on almost every language (templating system, framework...) we write, we want our code to look as close as possible to each other (if they relate, of course).
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
Description
When having a bit more complex blade components, format not pretty, not very readable, and in complete disconformity with Prettier itself. Here's an example
Suggested Solution
This is what we believe it should have done:
And if you take a look at how Prettier is formatting HTML (had to remove some stuff to make it a valid HTML, but the idea is still there), we get something very similar as the above:
Here's the playgroud link:
https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAHgWjACzmAawgFcYACASygAdSA6AcwCcTqywAbAQwGceBeADohmFACbYIHTD2pcomAExkAtmKSiJkabPmYAjMLIAZLgCM4HISADCFGAE8jcJiyYDhAZRdueAfiMmOABHYgogsQA+QSgMbDxCEnIg0PC4MTIAemjYzKxcfCJSSJAAGhAIahgKaB5kUC5XCAB3AAVGhDqULg5mrgc68rMmLkI4GE8uFThjKjhkADMenjghkbGJuTAqBmQYJmJVkBWVCj2Do54djjgARWIIeEXlo4ArHnRPa7uHp6QljgrcqhR5wVosahdEC8TBQODpdJlED7LgUDg7GwQFQqLjIaEcDhIq5QBg3ACCMH2FDMpDBLlmcOegKOOBgKg4AHUcPY4LowHBvFArtUAG72Bx4sB8JEiw4ASSgYgQEzATAoVTJis8jhuTKBIGoLBWHJG1Dxht5LhF83KVBWTBg4K4DBxeqOcncLjxrPZSMNVBgHPEMBwyAAHAAGcopMJBJ0u3H-F7lGDmINiEPIRTlYgrAAq5i6AP1cBUFjESrEphJxGdcAAYhAmDjKTs8VxSBAQABfbtAA
Alternatives
No response
Additional Context
No response