vicaryV
Denoβ€’2y agoβ€’
1 reply
vicary

Deno fmt with verbatimModuleSyntax?

Currently Deno fmt sorts verbatim imports alphabetically, this is conflicting with the Organize Imports in VS Code where it sorts import { type ... } entries individually at the end.

Example:
// VS Code
import {
  bar, 
  foo, 
  type Bar, 
  type Foo
} from "module";

// Deno fmt
import {
  type Bar, 
  bar, 
  type Foo, 
  foo
} from "module";


When combined with the following VS Code option, all of the files flashes between the two formats in random order depending on how formatOnSave is configured.
"editor.codeActionsOnSave": {
    "source.organizeImports": "explicit"
}


Is it possible to add an option for Deno fmt, either disabling that part or expose an option to align with VS Code?
Was this page helpful?