Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eslint github action workflow #2

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ESLint is a tool for identifying and reporting on patterns
# found in ECMAScript/JavaScript code.
# More details at https://github.com/eslint/eslint
# and https://eslint.org

name: ESLint

on:
push:
branches: '*'
pull_request:
branches: ['main', 'dev']

jobs:
eslint:
name: Run eslint scanning
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install ESLint
run: |
npm install [email protected]

- name: Run ESLint
run: npm run lint:pipeline
continue-on-error: true

- name: Upload ESLint report
uses: actions/upload-artifact@v2
with:
name: eslint-report
path: eslint-report.html

- name: Display ESLint report link
run: echo "::set-output name=eslint-report::${{ steps.upload.outputs.artifact_path }}"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "next build",
"start": "next start -p 8080",
"lint": "next lint",
"lint:pipeline": "next lint --fix --format=html --output-file=eslint-report.html",
"test": "jest",
"test:watch": "jest --watch"
},
Expand Down
Loading