Skip to content

Commit

Permalink
Integrate pretty_yaml for the YAML formatter (#130)
Browse files Browse the repository at this point in the history
* `dprint config add g-plane/pretty_yaml`

* Prefer single quote for YAML strings to keep current style

I should remember they recommend to use double quoting
https://github.com/g-plane/pretty_yaml/blob/444cc16883442534fcbf61437582fe4d63d22bb6/docs/config.md#L41

* `dprint config update --yes`

* Uninstall yamlfmt since using pretty_yaml

* `dprint fmt`
  • Loading branch information
kachick authored Jul 6, 2024
1 parent 21ac5aa commit 23ddc89
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 30 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,3 @@ jobs:
.
.github
.vscode
yamlfmt:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install mise
run: |
curl https://mise.jdx.dev/install.sh | sh
echo "$HOME/.local/share/mise/bin" >> $GITHUB_PATH
echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH
- name: Install yamlfmt
# TODO: Apply selfup after https://github.com/google/yamlfmt/pull/180
run: mise use -g [email protected]
- run: yamlfmt -lint .
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"editorconfig.editorconfig",
"tekumara.typos-vscode",
"dprint.dprint",
"kachick.vscode-yamlfmt",
"jnoortheen.nix-ide"
]
}
6 changes: 0 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"editor.defaultFormatter": "dprint.dprint",
"editor.formatOnSave": true,
"[yaml]": {
"editor.defaultFormatter": "kachick.vscode-yamlfmt"
},
"[github-actions-workflow]": {
"editor.defaultFormatter": "kachick.vscode-yamlfmt"
},
"[nix]": {
"editor.defaultFormatter": "jnoortheen.nix-ide"
},
Expand Down
6 changes: 5 additions & 1 deletion dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
},
"markdown": {
},
"yaml": {
"quotes": "preferSingle"
},
"toml": {
},
"malva": {
Expand All @@ -17,6 +20,7 @@
"https://plugins.dprint.dev/toml-0.6.2.wasm",
"https://plugins.dprint.dev/sql-0.2.0.wasm",
"https://plugins.dprint.dev/g-plane/malva-v0.5.1.wasm",
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.10.0.wasm"
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.10.0.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.2.0.wasm"
]
}
7 changes: 0 additions & 7 deletions yamlfmt.yml

This file was deleted.

0 comments on commit 23ddc89

Please sign in to comment.