chore(workflow): correct node version #4
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
name: Lint and Format | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.17.0' | |
- name: Install dependencies | |
run: npm install | |
- name: Run ESLint | |
run: npm run lint | |
- name: Check Prettier formatting | |
run: npm run prettier:check | |
- name: Run Prettier to fix formatting issues | |
if: failure() | |
run: npm run prettier:write | |
- name: Verify ESLint on latest commit | |
if: success() | |
run: npm run lint | |
- name: Verify Prettier formatting on latest commit | |
if: success() | |
run: npm run prettier:check |