Skip to content

A Github Action that convert ESLint report to markdown

Notifications You must be signed in to change notification settings

ldiego73/eslint-report-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

ESLint Report Action

Create a summary with the generated ESLint JSON report.

Summary

Summary

Annotations

Annotations

Inputs

token

Required Default is ${{ github.token }}

report

Required The path to the ESLint report JSON file

title

Optional. the Summary title

view-rules

Optional. Enables the display of errors or warnings by rules. Default is true

fail-on-warning

Optional. Fail when ESLint warnings are detected. Default is false

total-problems

Optional. Github has the limitation that you can only have 50 annotations and 65535 characters per request. This input tries to solve the problem, limiting the number of visible problems. Default is 100

Example usage

In .github/workflows/main.yml

name: Main flow

on:
  push:
    branches:
      - main

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: 16
      - run: npm ci
      - run: npm run lint:json
        continue-on-error: true
      - uses: ldiego73/[email protected]
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          report: reports/lint.json