From e0f3c9c39ed935eacf283a8b76d5a63a8f54397b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o?= Date: Tue, 30 Dec 2025 00:57:52 -0500 Subject: [PATCH] CI: Add linting Action for PRs with Prettier (#77) Co-authored-by: Antoine Phan --- .github/workflows/prettier-check.yml | 34 ++++++++++++++++++++++++++++ bun.lock | 1 + 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/prettier-check.yml diff --git a/.github/workflows/prettier-check.yml b/.github/workflows/prettier-check.yml new file mode 100644 index 0000000..9f165b7 --- /dev/null +++ b/.github/workflows/prettier-check.yml @@ -0,0 +1,34 @@ +name: Prettier Check + +on: + pull_request: + branches: + - main + +jobs: + prettier-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Check formatting with Prettier + run: bun run lint + continue-on-error: true + id: prettier-check + + - name: Comment on PR if formatting fails + if: steps.prettier-check.outcome == 'failure' + run: | + echo "::error::Prettier formatting check failed!" + echo "::error::Please run 'bun run format' to fix formatting issues." + exit 1 diff --git a/bun.lock b/bun.lock index 59f8f07..463ce6f 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "ecsess-website",