Skip to content

Commit

Permalink
Use Reviewdog to check all files with Prttier
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg committed Jul 29, 2023
1 parent be72d57 commit 5aec210
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
DIFF_DOCUMENTS=$(gh api repos/{owner}/{repo}/compare/${{ env.BASE_SHA }}...${{ env.HEAD_SHA }} \
--jq '.files | .[] | select(.status|IN("added", "modified", "renamed", "copied", "changed")) | .filename')
# filter out files that are not markdown
DIFF_DOCUMENTS=$(echo "${DIFF_DOCUMENTS}" | egrep -i "^files/.*\.md$" | xargs)
DIFF_DOCUMENTS=$(echo "${DIFF_DOCUMENTS}" | egrep -i "^files/.*$" | xargs)
echo "DIFF_DOCUMENTS=${DIFF_DOCUMENTS}" >> $GITHUB_ENV
- name: Setup Node.js environment
Expand All @@ -39,7 +39,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Perform linting
run: yarn prettier -w "${{ env.DIFF_DOCUMENTS }}"
run: yarn prettier --ignore-unknown --write "${{ env.DIFF_DOCUMENTS }}"

- name: Submit suggestion
uses: reviewdog/action-suggester@v1
Expand Down

0 comments on commit 5aec210

Please sign in to comment.