4

I'm using Visual Studio Code and the prettier plugin for it, version 5.8.0. In the extension settings of prettier I configured a tab width of 12. I also configured a tab width of 12 in a .prettierrc.json file:

{
    "useTabs": true,
    "tabWidth": 12,
}

The editor tab size of Visual Studio Code is set to 4. When I now create a new file and format it (auto save and auto format on save is enabled and default formatter is set to 'esbenp.prettier-vscode) then it's not indented by 12, but by 4. So my prettier settings are worthless.

Why? What did I wrong?

GarfieldKlon
  • 11,170
  • 7
  • 31
  • 33

1 Answers1

0

You can add the following to your package.json:

"prettier": {
    "tabWidth": 12
}
sofuslund
  • 118
  • 1
  • 10