Skip to content

Commit

Permalink
Merge pull request #542 from kachick/drop-dprint-process-plugins
Browse files Browse the repository at this point in the history
Replace dprint prettier plugin with yamlfmt
  • Loading branch information
kachick committed May 16, 2024
2 parents 38b36f7 + da98cfb commit 7667a17
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 7 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,14 @@ 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 .
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"soutaro.steep-vscode",
"soutaro.rbs-syntax",
"dprint.dprint",
"kachick.vscode-yamlfmt",
"rubocop.vscode-rubocop",
"jnoortheen.nix-ide"
]
Expand Down
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"[ruby]": {
"editor.defaultFormatter": "rubocop.vscode-rubocop"
},
"[yaml]": {
"editor.defaultFormatter": "kachick.vscode-yamlfmt"
},
"[github-actions-workflow]": {
"editor.defaultFormatter": "kachick.vscode-yamlfmt"
},
"[nix]": {
"editor.defaultFormatter": "jnoortheen.nix-ide"
},
Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,13 @@ task :deps do
sh('dprint --version')
sh('tree --version')
sh('typos --version')
sh('yamlfmt -version')
end

desc 'Tests except ruby'
task :check_non_ruby do
Rake::Task['dprint'].invoke
sh('typos . .github .vscode')
sh('yamlfmt -lint .')
sh('nixpkgs-fmt --check ./*.nix')
end
8 changes: 1 addition & 7 deletions dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,16 @@
},
"markdown": {
},
"prettier": {
"printWidth": 120,
"singleQuote": true
},
"excludes": [
".git",
"**/*lock.json",
"docs",
"doc",
"steep_expectations.yml",
"vendor",
"test/**/fixtures/**"
],
"plugins": [
"https://plugins.dprint.dev/json-0.19.1.wasm",
"https://plugins.dprint.dev/markdown-0.16.3.wasm",
"https://plugins.dprint.dev/prettier-0.32.1.json@19aa403ef0862ba8c41164e3dc6f84c0b7a66c2b11e42726b23dd25e6302ada9"
"https://plugins.dprint.dev/markdown-0.16.3.wasm"
]
}
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
nil
nixpkgs-fmt
typos
yamlfmt
];
};

Expand Down
7 changes: 7 additions & 0 deletions yamlfmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
gitignore_excludes: true
exclude:
- 'steep_expectations.yml'
line_ending: lf
formatter:
type: basic
retain_line_breaks_single: true

0 comments on commit 7667a17

Please sign in to comment.