pascalre / vscode-yaml-sort

This VS Code extension exposes the possibility to sort, format and validate yaml files.
https://marketplace.visualstudio.com/items?itemName=PascalReitermann93.vscode-yaml-sort
MIT License
41 stars 2 forks source link

Add ability to choose null type #204

Open vytux-com opened 2 months ago

vytux-com commented 2 months ago

I have a lot of documents which use the canonical null specification of ~ instead of the english null

Can we have an option to output either the original null type used or at least specify which type of null should we convert to

      - Description: Sample Rule
        IPAddress: 127.0.0.1
        OpenPorts: [80,443]
        RuleName: Sample
        ValidFrom: ~
        ValidTo: ~

gets converted to

      - Description: Sample Rule
        IPAddress: 127.0.0.1
        OpenPorts: [80,443]
        RuleName: Sample
        ValidFrom: null
        ValidTo: null

https://yaml.org/type/null.html

 ~ # (canonical)
|null|Null|NULL # (English)
| # (Empty)