Latest version make HTML code and vue templates unreadable
See original GitHub issueI have just updated prettier in VScode and now if makes aright old mess of html and vue.js template code.
Fort example it turns:
<div class="columns report-title" id="report-title">
<page-title title="Pre-Event Report" width="is-three-fifths" subtitle="View your pre-event attendance report."></page-title>
<event-selector class="column has-text-right-tablet" v-if="eventListLoaded" />
</div>
into
<div
class="columns report-title"
id="report-title"
>
<page-title
title="Pre-Event Report"
width="is-three-fifths"
subtitle="View your pre-event attendance report."
></page-title>
<event-selector
class="column has-text-right-tablet"
v-if="eventListLoaded"
/>
</div>
and one line of code like this:
<grid-item class="dash-panel" v-for="(item,index) in layout" :x="item.x" :y="item.y" :w="item.w" :h="item.h" :i="item.i" :minH="griditem.minH" :minW="griditem.minW" :maxH="griditem.maxH" :maxW="griditem.maxW" :key="index" :drag-allow-from="griditem.dragAllow">
into
<grid-item
class="dash-panel"
v-for="(item,index) in layout"
:x="item.x"
:y="item.y"
:w="item.w"
:h="item.h"
:i="item.i"
:minH="griditem.minH"
:minW="griditem.minW"
:maxH="griditem.maxH"
:maxW="griditem.maxW"
:key="index"
:drag-allow-from="griditem.dragAllow"
>
Makes the code look a right old mess, makes it unreadable and doubles the length of my source files.
Not exactly progress. Is there any way to go back to an older version, as I have had to disable prettier from my vscode setup?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Vue JS 3 Tutorial for Beginners #4 - The Vue CLI ... - YouTube
We'll talk about vue files, templates & template refs too. ... + Get VS Code - https:// code.visualstudio.com/ ...
Read more >Template Syntax | Vue.js
All Vue templates are syntactically valid HTML that can be parsed by spec-compliant browsers and HTML parsers.
Read more >7 Ways to Define a Component Template in Vue.js
There are plenty of choices when it comes to defining component templates in Vue. By my count, there are at least seven different...
Read more >VSCode prettier/vue formatting settings don't work properly
I have tried changing word-wrap-length and prettier lengths and indentations, font size and appearance of the mini map...nothing seems to make ...
Read more >Vue is specifically better because it uses HTML-based templates by ...
SSR/isometric rendering isn't new, but it's usually hacks around using a frontend JS framework to run the backend and can result in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yep, still doesn’t make it easy to read… those dangling closing tags freak out my OCD 😃
"vetur.format.defaultFormatter.html": "prettyhtml"
This made it work for me.