Skip to content

Commit

Permalink
Merge pull request #1072 from ZeLonewolf/zlw-prettier
Browse files Browse the repository at this point in the history
Upgrade the lint GitHub action
  • Loading branch information
ZeLonewolf authored May 19, 2024
2 parents 2c23198 + 1cf7a6d commit fd42553
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,19 @@ jobs:
# This is important to fetch the changes to the previous commit
fetch-depth: 0

- name: Prettify code
uses: creyD/prettier_action@v3.3 # https://github.com/creyD/prettier_action
- name: Set up Node.js
uses: actions/setup-node@v3
with:
dry: true
prettier_options: --write .
# Setting only_changed to false picks up new files
only_changed: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
node-version: "18" # Specify the Node.js version

- name: Install dependencies
run: npm install

- name: Run Prettier
id: prettier
run: npx prettier --check .
continue-on-error: false

- name: Check if Prettier failed
if: steps.prettier.outcome == 'failure'
run: exit 1

0 comments on commit fd42553

Please sign in to comment.