deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

yaml stringify is different from `deno fmt`

Open EdJoPaTo opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

Using @std/yaml stringify and deno fmt on the file afterwards the file is reformatted. This should not happen. stringify should output the same format or allow for the same format to be configured.

Currently, this involves the quotes style (' vs ") where @std/yaml uses ' while deno fmt uses ". There is no StringifyOptions to configure this behaviour and there is no way to call deno fmt from code? (Or is there?)

Describe the solution you'd like

Ideally @std/yaml stringify should output YAML which is already in the format expected by deno fmt. Being able to configure @std/yaml would also be helpful.

Describe alternatives you've considered

Being able to use deno fmt from code like Deno.fmt(…).

EdJoPaTo avatar Nov 19 '24 10:11 EdJoPaTo