frontend: js linter added #1
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 Frontend Code | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
lint: | |
name: Run ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' # or whichever version you are using | |
- name: Install dependencies | |
run: | | |
cd frontend | |
npm install | |
# If you're using Yarn, replace the above with: | |
# run: | | |
# cd frontend | |
# yarn install | |
- name: Run ESLint | |
run: | | |
cd frontend | |
npm run lint | |
# If you're using Yarn, replace the above with: | |
# run: | | |
# cd frontend | |
# yarn lint |