Add Prettier support for auto formatting YAML

This commit is contained in:
Franck Nijhof 2020-09-23 19:22:05 +02:00
parent 9ee6721a68
commit a0626760b9
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
3 changed files with 9 additions and 2 deletions

View file

@ -15,6 +15,7 @@ readonly -a PREVIOUS_DEFAULT_CONFIG_HASHES=(
4ef960e3d6e795adda51d5cbeb18d309fee87ba5cd177292a21b5a70a71a4726ae7053c3793cddc6d63d3b4dacc180ad3ea12d005fc8d63a1bc4cb29f9a17f18
c5b8acf06ef6d9a2435e9ddb92cb9fce7cfbfe4a2206b0e0c3c4ed514cc926f8d3c662e694a995d102b5ba939056f93201c220558e06e1cd0872bfb1995ba148
08d86c84a0d80720b22712e878963e90cbb34b659330dad8a823f3c5c7f0ae043d197a5e3020dd7ab4fda3625e17f794675ec074984951e7107db2488898a8d0
5243d7664d30b5aa0c45fbe1089cccdf85c5ade17cddd97e21b3a29ccb37b20d20bdfecc141ad6e1a7aa5ea8ee61695a79a43140a2d53f9f91687bc61f7e496c
)
if bashio::config.has_value 'config_path'; then

View file

@ -75,7 +75,10 @@
"[home-assistant]": {
"editor.autoIndent": "full",
"editor.insertSpaces": true,
"editor.tabSize": 2
"editor.tabSize": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnPaste": true
},
"editor.renderWhitespace": "boundary",
"esphome.dashboardUri": "15ef4d2f-esphome.local.hass.io:6052",
@ -87,5 +90,7 @@
"vsicons.dontShowNewVersionMessage": true,
"vsicons.projectDetection.disableDetect": true,
"workbench.iconTheme": "vs-seti",
"yaml.format.enable": true
"yaml.format.enable": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.rulers": [80, 88, 100, 120]
}