Skip to content

Commit

Permalink
bun run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Electroid committed Sep 25, 2024
1 parent 1e1025c commit 87c066d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 37 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/prettier-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: prettier-format

permissions:
contents: write

on:
workflow_call:
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/prettier.yml"
- "package.json"
- "scripts/**"
- "**/*.{yml,json,js,ts,tsx,jsx,mjs,cjs,mts,cts}"

env:
BUN_VERSION: "1.1.27"

jobs:
prettier-format:
name: prettier-format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: ./.github/actions/setup-bun
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Zig Format
run: |
bun run prettier:extra
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "`bun run prettier:extra`"
31 changes: 0 additions & 31 deletions .prettierrc-ci

This file was deleted.

15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,26 @@
"build:debug-zig-release": "cmake . -DCMAKE_BUILD_TYPE=Release -DZIG_OPTIMIZE=Debug -GNinja -Bbuild-debug-zig-release && ninja -Cbuild-debug-zig-release",
"bump": "bun ./scripts/bump.ts",
"typecheck": "tsc --noEmit && cd test && bun run typecheck",
"fmt": "prettier --config=.prettierrc-ci --write --cache './{.vscode,src,test,bench,packages/{bun-types,bun-inspector-*,bun-vscode,bun-debug-adapter-protocol}}/**/*.{mjs,ts,tsx,js,jsx}'",
"fmt": "bun run prettier",
"fmt:cpp": "bun run clang-format",
"fmt:zig": "bun run zig:fmt",
"fmt:zig": "bun run zig-format",
"lint": "eslint './**/*.d.ts' --cache",
"lint:fix": "eslint './**/*.d.ts' --cache --fix",
"test": "node scripts/runner.node.mjs ./build/bun-debug",
"test:release": "node scripts/runner.node.mjs ./build-release/bun",
"test": "node scripts/runner.node.mjs --exec-path ./build/debug/bun-debug",
"test:release": "node scripts/runner.node.mjs --exec-path ./build/release/bun",
"banned": "bun packages/bun-internal-test/src/linter.ts",
"zig": "vendor/zig/zig.exe",
"zig:fmt": "bun run zig fmt src/*.zig src/*/*.zig src/*/*/*.zig src/*/*/*/*.zig",
"zig:fmt": "bun run zig-format",
"zig:check": "bun run zig build check --summary new",
"zig:check-all": "bun run zig build check-all --summary new",
"zig:check-windows": "bun run zig build check-windows --summary new",
"cmake": "bun ./scripts/build.mjs -DCMAKE_BUILD_TYPE=Debug -B build/debug",
"clang-format": "bun run cmake --target clang-format",
"clang-format:check": "bun run cmake --target clang-format-check",
"zig-format": "bun run cmake --target zig-format",
"zig-format:check": "bun run cmake --target zig-format-check"
"zig-format:check": "bun run cmake --target zig-format-check",
"prettier": "prettier --config=.prettierrc --write --cache './{.vscode,src,test,bench,packages/{bun-types,bun-inspector-*,bun-vscode,bun-debug-adapter-protocol}}/**/*.{mjs,ts,tsx,js,jsx}'",
"prettier:check": "bun run prettier --check",
"prettier:extra": "bun run prettier --plugin=prettier-plugin-organize-imports"
}
}

0 comments on commit 87c066d

Please sign in to comment.