this_chord
this_chord3w ago

VS Code Deno formatter doesn't read deno.jsonc

I have a deno setup with this config in the root of my project: { "fmt": { "include": ["/*.ts", "/.tsx"], "exclude": ["**/.d.ts"], "lineWidth": 120 } } And it formats correctly to 120 max width with deno fmt, but when I use format on save in VS Code with Deno set as my default editor, it uses the default configuration with max width 80. Why is this?
6 Replies
marvinh.
marvinh.3w ago
That sounds like a bug. Can you file an issue for that on https://github.com/denoland/deno/issues ?
GitHub
Issues · denoland/deno
A modern runtime for JavaScript and TypeScript. Contribute to denoland/deno development by creating an account on GitHub.
this_chord
this_chordOP3w ago
Sure
this_chord
this_chordOP3w ago
GitHub
VS Code doesn't use the deno fmt configuration from deno.jsonc ...
Version: Deno 2.1.9 I'm trying to use the Deno formatter in VS Code, but it's not using the configuration I've set up. I do have Deno set as my default formatter, and I have format on s...
this_chord
this_chordOP2w ago
@marvinh. any chance this could be looked at? The default configuration is reformatting all of my files, causing frustrating Git diffs.
Oak
Oak2w ago
Hey @this_chord. Did you try with these settings in VSCode? .vscode/settings.json:
{
"deno.enable": true,
"deno.unstable": true,
"deno.lint": true,
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}
{
"deno.enable": true,
"deno.unstable": true,
"deno.lint": true,
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}
this_chord
this_chordOP2w ago
I'll give it a try

Did you find this page helpful?