Skip to content

Commit

Permalink
Replace yamlfmt with pretty_yaml to keep simple dependencies (#292)
Browse files Browse the repository at this point in the history
* Replcae yamlfmt with pretty_yaml

* `dprint config update --yes`

* Prefer single quote for YAML strings to keep current style

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

* `dprint fmt`
  • Loading branch information
kachick authored Jul 6, 2024
1 parent e2eb212 commit c9ddd6b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 19 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/generate_site_and_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Build hugo-nix to measure how longtime used to build
run: 'nix run .#hugo-nix -- version'
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && nix develop --command npm ci || true"
run: '[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && nix develop --command npm ci || true'
# Required go env before this step because hugo module depends on it. Now whole setup is completed with Nix
- name: Build with Hugo
env:
Expand All @@ -60,7 +60,7 @@ jobs:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
group: 'pages'
cancel-in-progress: false
environment:
name: github-pages
Expand All @@ -72,4 +72,3 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

1 change: 0 additions & 1 deletion .github/workflows/go-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ jobs:
cache-dependency-path: 'tool/go.sum'
- name: Build
run: go build -C ./tool/sincelastcommit -v

6 changes: 0 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Lint
on:
pull_request:
workflow_dispatch:

jobs:
typo:
timeout-minutes: 15
Expand All @@ -21,11 +20,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup go to install yamlfmt
uses: actions/setup-go@v5
- name: Install yamlfmt
run: |
go install github.com/google/yamlfmt/cmd/yamlfmt@v0.10.0
- uses: dprint/check@v2.2
with:
dprint-version: 0.45.0
3 changes: 1 addition & 2 deletions .github/workflows/notify_long_time_no_see.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: notification
SLACK_MESSAGE: "最後のブログ更新から ${{ env.SINCE_LAST_COMMIT }} 日過ぎています。"
SLACK_MESSAGE: '最後のブログ更新から ${{ env.SINCE_LAST_COMMIT }} 日過ぎています。'
SLACK_USERNAME: pankona
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

9 changes: 3 additions & 6 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"excludes": [],
"exec": {
"commands": [{
"command": "yamlfmt -in -formatter retain_line_breaks=true",
"exts": ["yaml", "yml"]
}]
"yaml": {
"quotes": "preferSingle"
},
"plugins": [
"https://plugins.dprint.dev/exec-0.4.4.json@c207bf9b9a4ee1f0ecb75c594f774924baf62e8e53a2ce9d873816a408cecbf7"
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.2.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 @@
gnumake
coreutils
peco
yamlfmt
typos
imagemagick
actionlint
Expand Down

0 comments on commit c9ddd6b

Please sign in to comment.