Run ESLint and fix all auto-fixable errors #26
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: Linting | |
run-name: Run ESLint and fix all auto-fixable errors | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
linting: | |
name: Linting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
- name: Install dependencies | |
run: npm run --frozen-lockfile | |
- name: Prepare Nuxt | |
run: npm run nuxi prepare | |
- name: Run ESLint | |
run: npm run lint | |
- name: Fix all auto-fixable errors | |
run: npm run lint:fix |