Skip to content

Commit

Permalink
Replace yamlfmt with pretty_yaml (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick authored Jul 15, 2024
1 parent b464a2c commit bf91337
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 35 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,6 @@ jobs:
with:
dprint-version: '0.45.1' # selfup {"extract":"\\d[^']+","replacer":["bash","-c","dprint --version | cut -d ' ' -f 2"]}

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 .

typos:
timeout-minutes: 15
runs-on: ubuntu-24.04
Expand Down
9 changes: 8 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,14 @@ Style/MethodCallWithArgsParentheses:
AllowParenthesesInChaining: true
AllowParenthesesInCamelCaseMethod: true
AllowParenthesesInStringInterpolation: true
AllowedMethods: ['raise', 'puts', 'yield', 'require', 'require_relative', 'load']
AllowedMethods: [
'raise',
'puts',
'yield',
'require',
'require_relative',
'load',
]
Exclude:
- '*.gemspec'
- '**.md'
Expand Down
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"github.vscode-github-actions",
"tekumara.typos-vscode",
"rubocop.vscode-rubocop",
"dprint.dprint",
"kachick.vscode-yamlfmt"
"dprint.dprint"
]
}
6 changes: 0 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "dprint.dprint",
"[yaml]": {
"editor.defaultFormatter": "kachick.vscode-yamlfmt"
},
"[github-actions-workflow]": {
"editor.defaultFormatter": "kachick.vscode-yamlfmt"
},
"[ruby]": {
"editor.defaultFormatter": "rubocop.vscode-rubocop"
},
Expand Down
2 changes: 0 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ desc 'Print dependencies'
task :deps do
sh('ruby --version')
sh('dprint --version')
sh('yamlfmt -version')
sh('tree --version')
sh('typos --version')
end
Expand All @@ -59,6 +58,5 @@ desc 'Tests except ruby'
task :linters do
sh('typos . .github .vscode')
sh('dprint check')
sh('yamlfmt -lint .')
sh('nixpkgs-fmt --check ./*.nix')
end
7 changes: 6 additions & 1 deletion dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
},
"markdown": {
},
"yaml": {
"quotes": "preferSingle",
"trimTrailingWhitespaces": false
},
"excludes": [
".git",
"**/*lock.json",
Expand All @@ -13,6 +17,7 @@
],
"plugins": [
"https://plugins.dprint.dev/json-0.19.2.wasm",
"https://plugins.dprint.dev/markdown-0.16.4.wasm"
"https://plugins.dprint.dev/markdown-0.16.4.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.3.0.wasm"
]
}
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
libyaml

dprint
yamlfmt
tree
nil
nixpkgs-fmt
Expand Down
7 changes: 0 additions & 7 deletions yamlfmt.yml

This file was deleted.

0 comments on commit bf91337

Please sign in to comment.