From 6791f0f130e8e96af7facfb6a3c7da39fd3cd778 Mon Sep 17 00:00:00 2001 From: Saq Imtiaz Date: Thu, 2 Oct 2025 22:33:09 +0200 Subject: [PATCH] Create eslint.yml (#9315) Adds a workflow to lint PRs, and reports issues found in lines modified in the PR. --- .github/workflows/eslint.yml | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/eslint.yml diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml new file mode 100644 index 000000000..a4c572a7a --- /dev/null +++ b/.github/workflows/eslint.yml @@ -0,0 +1,43 @@ +name: ESLint + +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - master + workflow_dispatch: + +concurrency: + group: lint-${{ github.event.pull_request.number || github.ref_name }} + cancel-in-progress: true + +permissions: + contents: read + # Needed for GitHub Checks API + checks: write + +jobs: + eslint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies + run: npm install --include=dev + + - name: Run ESLint with reviewdog (GitHub Checks) + uses: reviewdog/action-eslint@v1 + with: + eslint_flags: '.' + reporter: github-pr-check + fail_level: error + level: error + tool_name: ESLint PR code