OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Why does Prettier not format code in VS Code?

  • Thread starter Thread starter Billal Begueradj
  • Start date Start date
B

Billal Begueradj

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

When I open a .vue file and press CMD+ Shift + P and choose Format Document, my file does not get formatted at all.

My .prettierrc settings:

Code:
{
  "tabWidth": 2,
  "semi": false,
  "singleQuote": true
}

I have so many source code lines, so I cannot format them manually. What am I doing wrong?

<p>In my Nuxt application where ESlint and Prettier are installed and enabled, I switched to Visual Studio Code.</p>
<p>When I open a <strong>.vue</strong> file and press <kbd>CMD</kbd>+ <kbd>Shift</kbd> + <kbd>P</kbd> and choose <strong>Format Document</strong>, my file does not get <a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode" rel="noreferrer">formatted</a> at all.</p>
<p>My <strong>.prettierrc</strong> <a href="https://prettier.io/docs/en/configuration.html" rel="noreferrer">settings</a>:</p>
<pre><code>{
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
</code></pre>
<p>I have so many source code lines, so I cannot format them manually. What am I doing wrong?</p>
 

Latest posts

Top