tweag / nickel

Better configuration for less
https://nickel-lang.org/
MIT License
2.23k stars 85 forks source link

Add empty YAML header when exporting #1979

Open yannham opened 1 week ago

yannham commented 1 week ago

Is your feature request related to a problem? Please describe. When exporting Nickel to YAML, Nickel output the document directly, without an empty YAML header ---\n. While this is entirely fine by the standard, most YAML linters prefer that you add this prelude. It would appease such linters to automatically include an empty YAML header when exporting Nickel expressions.

Describe the solution you'd like

nickel export --formal yaml <<< '{hello = "world"}'
---
hello: world