conflict with vetur prettyhtml
See original GitHub issueTell us about your environment
- ESLint version: 5.9.0
- eslint-plugin-vue version: 5.0.0
- Node version: 11.3.0
Please show your full configuration:
"eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/recommended",
      "standard",
      "prettier",
      "prettier/standard"
    ],
    "rules": {},
    "parserOptions": {
      "parser": "babel-eslint"
    }
}
What did you expect to happen? The problem is:
- Prettyhtml does not put space before />: <HelloWorld msg="Welcome to Your Vue.js App"/>
- eslint-plugin-vue wants a space before /> and actually have a autofix for it
- They cannot agree on a format.
please see this issue: https://github.com/vuejs/vetur/issues/994#issuecomment-442745593
thank you
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (3 by maintainers)
 Top Results From Across the Web
Top Results From Across the Web
Prettyhtml/Lobby - Gitter
I am using pretty html with Vue through Vetur. Any particular reason that when you format code it changes the classname attribute name...
Read more >Script part of .vue files gets formatted by Vetur but without the ...
Prettier formats the project's .ts files without any issues. In my .vue files Vetur uses prettyhtml for the template part which works fine...
Read more >ES Lint, Prettier, Vetur, VSCode: Ironing out the conflicts
I could tell that they were being prettied twice because the first round removed the trailing commas and the second round put them...
Read more >vscode, eslint, prettier, vetur conflicts and solutions
vscode, eslint, prettier, vetur conflicts and solutions. These 3 tools must be installed. But after installation, rule conflicts are another headache.
Read more >How to resolve eslint(vue/html-closing-bracket-newline) conflict
How to fix the below conflict? ... defaultFormatter.sass": "sass-formatter", "vetur.validation.template": true, "vetur.format.
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

I got confused with
Prettyhtmlandprettier.If you want to use eslint’s autofix, I think you need to change the following settings to
settings.json.If you want to use Prettyhtml you need to add the following settings to
.eslintrc.@francoisromain - I spent a ton of time researching why this is happening. It turns out that Prettyhtml removes all whitespace and doesn’t have a way to turn it off.
Prettier always wraps attributes and doesn’t have a way to turn that off.
I ended up going with js-beautify-html for now. I would like to use Prettyhtml, but I need that whitespace sometimes.
I blogged and created a video on my experience trying to get everything to play nice together: https://blog.jongallant.com/2019/02/vuejs-vetur-vscode-format-eslint-issues/
https://youtu.be/z3u6LYRKHWE