Skip to content

Commit

Permalink
Update format.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Mudasir Murtaza <109586296+mudasirmurtaza@users.noreply.github.com>
  • Loading branch information
mudasirmurtaza authored Oct 17, 2024
1 parent 1697e56 commit 50ffb7a
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
name: Lint and Format
name: Format

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
format:
runs-on: ubuntu-latest
@@ -14,16 +11,18 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
node-version: '20'

- name: Install dependencies
run: npm install --save-dev prettier

- name: Check formatting
run: npx prettier --check .
run: npm install

- name: Format code
run: npx prettier --write .
- name: Run Prettier to check formatting
run: npm run prettier -- --check
continue-on-error: false

0 comments on commit 50ffb7a

Please sign in to comment.