prettier.tabWidth not working
See original GitHub issueI have added a .prettierrc to the root of a project i am working on and have set tabWidth to be 4. When i format a document the code gets formatted but the tab width is 2 spaces wide. This happens to all types of files (.js, .scss, .css, etc).
In the VSC User Settings i have also "editor.tabSize": 4,
I am using the latest versions of VSC and Prettier on Windows 10. Can anyone tell me why i can’t change the tab width?

Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Unable to set tab width to 4 in prettier - Stack Overflow
First, remove any .prettierrc from the working directory. Because it overrides user settings and uses the default values.
Read more >Options - Prettier
Prettier's printWidth option does not work the same way. It is not the hard upper allowed line length limit. It is a way...
Read more >VS Code: edits with 4-spaces, saves with 2-spaces - Super User
The default tab width used by Prettier is 2. After setting it to 4, the file is now saved with 4 spaces. The...
Read more >VS Code Prettier Setting: prettier.tabWidth - YouTube
Want to master VS Code? Click here: https://andrecasal.com/courses/mastery-for-vs-codeWant to upgrade web dev skills?
Read more >How to set prettier indents? - Vi and Vim Stack Exchange
To solve my issue of prettier tab spaces, I added this: "prettier.tabWidth": 4. Finally, this page gives a full list of all your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Looks like you’ve confused the vscode settings with the Prettier settings. It should simply be
"tabWidth": 4rather thanprettier.tabWidth.If you press ctrl-space you should get completions