From 029f60b01ac84ad7c45049f624e7c246f34d5609 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sat, 25 Apr 2026 16:01:05 -0400 Subject: [PATCH] chore: replace prettier with biome --- .github/workflows/quality.yaml | 15 ++++++++------- .pre-commit-config.yaml | 11 ++++++----- .prettierignore | 1 - .prettierrc | 9 --------- biome.json | 17 +++++++++++++++++ flake.nix | 2 +- 6 files changed, 32 insertions(+), 23 deletions(-) delete mode 100644 .prettierignore delete mode 100644 .prettierrc create mode 100644 biome.json diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index c0b7770..2bac1f9 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest outputs: lua: ${{ steps.changes.outputs.lua }} - markdown: ${{ steps.changes.outputs.markdown }} + biome: ${{ steps.changes.outputs.biome }} steps: - uses: actions/checkout@v4 - uses: dorny/paths-filter@v3 @@ -26,8 +26,9 @@ jobs: - '.luarc.json' - '*.toml' - 'vim.yaml' - markdown: - - '*.md' + biome: + - '.luarc.json' + - 'biome.json' lua-format: name: Lua Format Check @@ -63,12 +64,12 @@ jobs: directories: lua configpath: .luarc.json - markdown-format: - name: Markdown Format Check + biome-format: + name: Biome Format Check runs-on: ubuntu-latest needs: changes - if: ${{ needs.changes.outputs.markdown == 'true' }} + if: ${{ needs.changes.outputs.biome == 'true' }} steps: - uses: actions/checkout@v4 - uses: cachix/install-nix-action@v31 - - run: nix develop --command prettier --check . + - run: nix develop --command biome format . diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d1f13f..a168bc2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,9 +9,10 @@ repos: files: \.lua$ pass_filenames: true - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.8 + - repo: local hooks: - - id: prettier - name: prettier - files: \.(md|toml|yaml|yml|sh)$ + - id: biome + name: biome + entry: biome format --write + language: system + files: \.(json|jsonc)$ diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index c2658d7..0000000 --- a/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 0663621..0000000 --- a/.prettierrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "proseWrap": "always", - "printWidth": 80, - "tabWidth": 2, - "useTabs": false, - "trailingComma": "none", - "semi": false, - "singleQuote": true -} diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..491aae4 --- /dev/null +++ b/biome.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.3.15/schema.json", + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "files": { + "ignoreUnknown": true + }, + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 2, + "lineWidth": 80 + } +} diff --git a/flake.nix b/flake.nix index d49a582..4c702b5 100644 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,7 @@ nlua ] )) - pkgs.prettier + pkgs.biome pkgs.stylua pkgs.selene ];