Why Prettier does not format code in VSCODE?

后端 未结 18 781
失恋的感觉
失恋的感觉 2020-12-07 18:39

In my Nuxt application where ESlint and Prettier are installed and enabled, I switched to Visual Studio Code editor.

When I open a .vue file and pre

18条回答
  •  长情又很酷
    2020-12-07 18:48

    1 .Use the other extension prettier was not working for me i just use the other VSCODE extension named PrettierNow i think this will help, done for me.Checkout the extension here

    2 .From Latest Updates of prettier you need to add .prettierrc file in your root of the projects if you want to stick with prettier. An example of .prettierrc is this-

    {
      "tabWidth": 4,
      "singleQuote": true,
      "semi": false
    }
    

提交回复
热议问题