Skip to content

ESLint

ESLint #213

Workflow file for this run

name: ESLint
on:
push:
branches: ["main"]
paths:
- 'react-frontend/**'
pull_request:
branches: ["main"]
paths:
- 'react-frontend/**'
schedule:
- cron: '31 4 * * 2'
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 dependencies
run: |
cd react-frontend
npm install
npm install @microsoft/eslint-formatter-sarif@3.1.0
- name: Run ESLint
env:
SARIF_ESLINT_IGNORE_SUPPRESSED: "true"
run: |
npx eslint . \
--config eslint.config.js \
--format @microsoft/eslint-formatter-sarif \
--output-file eslint-results.sarif
working-directory: ./react-frontend
shell: bash
- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: react-frontend/eslint-results.sarif
wait-for-processing: true