Skip to content

Commit

Permalink
Replace yamlfmt with pretty_yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jul 7, 2024
1 parent 556cc96 commit 76cadb5
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 36 deletions.
5 changes: 4 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"dependencyDashboard": true,
"labels": ["dependencies", "renovate"],
"enabledManagers": ["nix"],
"enabledManagers": ["nix", "regex"],
"extends": [
"github>kachick/renovate-config-dprint#1.1.0"
],
"nix": {
"enabled": true
},
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/GH-820-graceperiod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,3 @@ jobs:
"startupGracePeriod": { "seconds": 60 }
}
]
16 changes: 1 addition & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
paths-ignore:
- 'dist/**'
workflow_dispatch:

jobs:
deno_lint:
timeout-minutes: 15
Expand All @@ -19,7 +18,6 @@ jobs:
with:
deno-version: '1.43.6' # selfup {"extract":"\\d[^']+","replacer":["bash","-c","deno --version | head -n 1"], "nth": 2}
- run: deno lint

dprint:
timeout-minutes: 15
runs-on: ubuntu-24.04
Expand All @@ -28,7 +26,6 @@ jobs:
- uses: dprint/check@2f1cf31537886c3bfb05591c031f7744e48ba8a1 # v2.2
with:
dprint-version: '0.45.1' # selfup { "extract": "\\d[^']+", "replacer": ["dprint", "--version"], "nth": 2 }

typos:
timeout-minutes: 15
runs-on: ubuntu-24.04
Expand All @@ -38,18 +35,7 @@ jobs:
# Because getting commit ref from version string requires network access.
- uses: crate-ci/typos@c16dc8f5b4a7ad6211464ecf136c69c851e8e83c # v1.22.9
with:
files: |
files: |-
.
.github
.vscode
yamlfmt:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
- name: Install yamlfmt
run: go install github.com/google/yamlfmt/cmd/[email protected] # TODO: Apply selfup after https://github.com/google/yamlfmt/pull/179
- run: yamlfmt -lint .
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"github.vscode-github-actions",
"editorconfig.editorconfig",
"dprint.dprint",
"kachick.vscode-yamlfmt",
"tekumara.typos-vscode",
"jnoortheen.nix-ide",
"tamasfe.even-better-toml",
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"
},
"[nix]": {
"editor.defaultFormatter": "jnoortheen.nix-ide"
},
Expand Down
3 changes: 0 additions & 3 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ category = "Tools"
description = "Run formatters with changes"
script = [
"dprint fmt",
"yamlfmt .",
"git ls-files '*.nix' | xargs nix fmt",
]

Expand All @@ -22,7 +21,6 @@ category = "Tools"
description = "Run linters without changes"
script = [
"dprint check",
"yamlfmt -lint .",
"deno lint",
"typos . .github .vscode",
"gitleaks detect",
Expand Down Expand Up @@ -72,7 +70,6 @@ script = [
"deno --version",
"makers --version",
"dprint --version",
"yamlfmt -version",
"nixfmt --version",
"typos --version",
"gh --version",
Expand Down
4 changes: 3 additions & 1 deletion dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
"trailingCommas": "never"
},
"markdown": {},
"yaml": { "quotes": "preferSingle" },
"excludes": ["**/node_modules", "**/*-lock.json", "lib/**", "dist/**", "pnpm-lock.yaml", "logs/**"],
"plugins": [
"https://plugins.dprint.dev/typescript-0.90.1.wasm",
"https://plugins.dprint.dev/json-0.19.2.wasm",
"https://plugins.dprint.dev/markdown-0.16.4.wasm",
"https://plugins.dprint.dev/toml-0.6.1.wasm"
"https://plugins.dprint.dev/toml-0.6.1.wasm",
"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 @@ -46,7 +46,6 @@
deno
dprint
typos
yamlfmt

# Helper for writing and linting actions
#
Expand Down
7 changes: 0 additions & 7 deletions yamlfmt.yml

This file was deleted.

0 comments on commit 76cadb5

Please sign in to comment.