DenoDDeno
Powered by
vicaryV
Denoβ€’3y 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 ... }
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";
// 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
formatOnSave
is configured.
"editor.codeActionsOnSave": {
    "source.organizeImports": "explicit"
}
"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?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Prettier plugin support with deno fmt
KotkoroidKKotkoroid / help
14mo ago
deno fmt vs prettier
Gary KGGary K / help
9mo ago
Deno fmt conflicting with Deno lint, when using IIFE
1771771771177177177 / help
4y ago
Can I fmt a string with Deno.<...>(...) ?
PaxiliusPPaxilius / help
16mo ago