againA
Denoβ€’2y agoβ€’
6 replies
again

deno fmt doesn't work properly using Visual Studio Code and WSL2

I am using:
- Visual Studio Code 1.91.1
- Deno extension (in WSL: UBUNTU) v3.38.0
- WSL extension v0.88.2
- Deno 1.45.3
- WSL2

.vscode/settings.json:
{
    "deno.enable": true,
    "deno.unstable": true,
    "editor.defaultFormatter": "denoland.vscode-deno",
    "editor.formatOnSave": true
}

Whenever I save a file it automatically formats to the visual studio code settings (4 spaces for json/js/ts files). I have no user preferences.
deno fmt filename works properly because it indents the file to 2 spaces (default deno fmt settings).

I just want to know if anyone has the same problem ?
image.png
Was this page helpful?