I am have trouble getting formatting to work for javascript in Visual Studio Code. I am using the Preitter formatter for almost everything except python. Here is my VSCode settings for some of the files.
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
And here is my .prettierrc file:
{
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"trailingComma": "all",
"bracketSpacing": true,
"proseWrap": "always",
"semi": false,
"singleQuote": true
}
The css, html all format fine, specifically the tab with. However my javascript files don't indent 4 spaces only 2. VSCode's default tab with is also set to 4. Any help would be greatly appreciated.
Thanks Dawson