question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.vue file can not format when set `prettier.eslintIntegration` in vscode setting config

See original GitHub issue

VSCode: v1.24.1 OS: win10 prettier: 1.5.0(vscode plugin) eslint: 1.4.12(vscode plugin)

I use both prettier and eslint in vscode. When I set prettier.eslintIntergration: true in vscode setting config, prettier can not format .vue file.

output from Vue Language Server: image

My .eslintrc.js is:

module.exports = {
  root: true,
  extends: ['plugin:vue-libs/recommended']
}

Thx!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:16
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

21reactions
santpshpandeylillycommented, Oct 7, 2018

Just in case someone has problem. Try adding this in VS Code User Settings

"eslint.validate": [
    "javascript",
    "javascriptreact",
    { "language": "vue", "autoFix": true }
  ]
11reactions
xunan007commented, Jul 29, 2018

At last I change the config and use two commands… i. Set vetur.format.defaultFormatter.js

"vetur.format.defaultFormatter.js": "vscode-typescript"

ii. Then use keyboard shortcuts to format Document and Fix all auto-fixable Problems

Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCode prettier/vue formatting settings don't work properly
Only advice I can give is stop using Prettier. Trying to make it work with ESlint and Vetur was always pain. Then I...
Read more >
How to setup ESLint and Prettier with VS Code and VueJS
You can set Vetur as the default by selecting ”Configure Default Formatter” after ”Format Document With…” then select ”Vetur” from the options.
Read more >
Efficient Code Analyzing and Formatting (for Vue.js) with ...
Prettier is a zero-configuration code formatting utility by design. ... With the current setup, *.vue files are not processed correctly yet, ...
Read more >
Having a tough time setting up EsLint/Prettier to work with Volar
I'm having a tough time understanding how VSCode with the Volar extension, Eslint and Prettier all work together. I followed this article to ......
Read more >
Quick VSCode setup for Vue.js with Prettier and ESLint
Prettier formats the JS code in a nice opinionated way. However this is not fully aligned with ESLint and therefore the build fails...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found