From 40cd76ed9ca62b05e27735d2ee19ef0b147b461a Mon Sep 17 00:00:00 2001 From: Arman Moztarzadeh Date: Mon, 2 Sep 2024 16:45:43 -0700 Subject: [PATCH] Enforce prettier for pull requests to main (#351) * Create prettier.yml * Update prettier.yml * Update prettier.yml * Update prettier.yml * Update prettier.yml * Update prettier.yml * Update prettier.yml --------- Co-authored-by: Armin Talaie --- .github/workflows/prettier.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/prettier.yml diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 00000000..c4aa8801 --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,26 @@ +name: Lint + +on: + pull_request: + push: + branches: + - main +jobs: + prettier: + name: Prettier + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up pnpm + uses: pnpm/action-setup@v4.0.0 + with: + version: latest + + - name: Install dependencies + run: pnpm install + + - name: Run Prettier + run: pnpm exec prettier --check "**/*.{js,jsx,ts,tsx,json,css,md}"