From a8a045cbc796b659e2b8cd7ee726ac0a8363b4e0 Mon Sep 17 00:00:00 2001 From: Colin Fortuner Date: Tue, 15 Aug 2023 18:31:30 +0000 Subject: [PATCH] prettier --- .github/workflows/prettier.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 56b88e7..245e300 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -1,10 +1,10 @@ -name: ESLint and Prettier Check +name: ESLint Check on: push jobs: lint-check: - name: Lint with ESLint and Prettier + name: Lint with ESLint runs-on: ubuntu-latest steps: @@ -19,5 +19,15 @@ jobs: - name: Install Dependencies run: npm ci - - name: Lint with Prettier - run: npx prettier --check . \ No newline at end of file + - name: Get list of files in this PR + id: get-changed-files + uses: lots0logs/gh-action-get-changed-files@2.1.4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Lint with ESLint + run: | + for file in ${{ steps.get-changed-files.outputs.all }} + do + npx eslint $file --ext .js,.jsx,.ts,.tsx + done \ No newline at end of file