prettier-vscode is ignoring my tabs setting

840 Views Asked by At

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?

1

There are 1 best solutions below

1
On

You can add the following to your package.json:

"prettier": {
    "tabWidth": 12
}