Unstable Vue formatting / semicolon issue
See original GitHub issuePrettier 1.15.1 Playground link
--parser vue
Input:
<template>
<p @click="() => {console.log(test)}">
test
</p>
</template>
Output:
<template>
<p
@click="
() => {
console.log(test);
}
"
>
test
</p>
</template>
Second Output:
<template>
<p
@click="
() => {
console.log(test);
};
"
>
test
</p>
</template>
Expected behavior:
- Stable formatting
- According to https://github.com/prettier/prettier/pull/5259#issuecomment-437064991 the semicolon after the
}
is not allowed.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Stop Visual Studio Code From Automatically Adding ...
vue file and chose "Format Document" option Visual Studio Code automatically add the semicolons that intentionally removed them. How do I stop ...
Read more >Code in Vue.js project templates missing semicolons - YouTrack
js project templates missing semicolons. WebStorm flags these with an error, and because it is only a semicolon, this is often hard to...
Read more >How to Setup Vue.js with VS Code and Fix Formatting and ES ...
When you create a Vue.js project with the Vue CLI or UI and select Prettier - you'll have a bunch of ES Lint...
Read more >ESLint with Prettier and Vue in VS Code - YouTube
In this video I show how to setup ESLint and Prettier in your VueJS applications and how to get them working properly inside...
Read more >Prettier 1.15: HTML, Vue, Angular and MDX Support
Prettier can now format HTML, Vue and Angular files! ... To solve this problem, we flattened the else-branch for nested ternaries in a ......
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
@michaeljota the leading semi colon is definitely strange, not an error though
The fix is available in
1.15.2
.