Skip to content

Commit

Permalink
Replace yamlfmt with pretty_yaml
Browse files Browse the repository at this point in the history
* `dprint config add g-plane/pretty_yaml`

* Replace yamlfmt with pretty_yaml

* `dprint fmt`
  • Loading branch information
kachick authored Jul 6, 2024
1 parent 1ea5a6c commit 17ac1ce
Show file tree
Hide file tree
Showing 13 changed files with 158 additions and 189 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,6 @@ jobs:
.github
.vscode
yamlfmt:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
- name: Install yamlfmt
run: go install github.com/google/yamlfmt/cmd/[email protected] # TODO: Apply selfup after https://github.com/google/yamlfmt/pull/180
- run: yamlfmt -lint .

stylua:
timeout-minutes: 15
runs-on: ubuntu-24.04
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ defaults:
jobs:
# This job has many comment-out tyle note, agree to ugly, but do NOT remove for now.
# See #443 for detail.
terraform: # Not Terraform :)
#
# Not Terraform :)
terraform:
runs-on: windows-2022
steps:
- name: Prepare Windows Defender
Expand Down
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"recommendations": [
"editorconfig.editorconfig",
"dprint.dprint",
"kachick.vscode-yamlfmt",
"tekumara.typos-vscode",
"github.vscode-github-actions",
"timonwong.shellcheck",
Expand Down
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"
},
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
Expand Down
1 change: 0 additions & 1 deletion cmd/deps/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ func main() {
{Path: "makers", Args: []string{"--version"}},
{Path: "nix", Args: []string{"--version"}},
{Path: "dprint", Args: []string{"--version"}},
{Path: "yamlfmt", Args: []string{"-version"}},
{Path: "shellcheck", Args: []string{"--version"}},
{Path: "shfmt", Args: []string{"--version"}},
{Path: "typos", Args: []string{"--version"}},
Expand Down
1 change: 0 additions & 1 deletion cmd/fmt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ func main() {
// Do not cover the same files in another formatter for parallel processing
cmds := runner.Commands{
{Path: "dprint", Args: []string{"fmt"}},
{Path: "yamlfmt", Args: []string{"."}},
{Path: "shfmt", Args: append([]string{"--language-dialect", "bash", "--write"}, bashPaths...)},
{Path: "stylua", Args: []string{"."}},
}
Expand Down
1 change: 0 additions & 1 deletion cmd/lint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ func main() {

cmds := runner.Commands{
{Path: "dprint", Args: []string{"check"}},
{Path: "yamlfmt", Args: []string{"-lint", "."}},
{Path: "shfmt", Args: append([]string{"--language-dialect", "bash", "--diff"}, bashPaths...)},
{Path: "shellcheck", Args: bashPaths},
// nix fmt doesn't have check option: https://github.com/NixOS/nix/issues/6918, so do not include here
Expand Down
1 change: 0 additions & 1 deletion config/vscode/extensions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ github.vscode-github-actions
golang.go
jnoortheen.nix-ide
johnnymorganz.stylua
kachick.vscode-yamlfmt
ms-azuretools.vscode-docker
ms-ceintl.vscode-language-pack-ja
rubocop.vscode-rubocop
Expand Down
6 changes: 0 additions & 6 deletions config/vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
"editor.formatOnSave": true
},
"json.format.enable": false,
"[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": {
},
"excludes": [
Expand All @@ -15,6 +18,7 @@
"plugins": [
"https://plugins.dprint.dev/json-0.19.3.wasm",
"https://plugins.dprint.dev/markdown-0.17.1.wasm",
"https://plugins.dprint.dev/toml-0.6.2.wasm"
"https://plugins.dprint.dev/toml-0.6.2.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.2.0.wasm"
]
}
2 changes: 0 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@
cargo-make

dprint
# TODO: Use stable if https://github.com/google/yamlfmt/pull/179 is released
edge-pkgs.yamlfmt
stylua
typos
typos-lsp
Expand Down
Loading

0 comments on commit 17ac1ce

Please sign in to comment.