-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mudasir Murtaza <109586296+mudasirmurtaza@users.noreply.github.com>
- Loading branch information
1 parent
1697e56
commit 50ffb7a
Showing
1 changed file
with
13 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |