Skip to content

ver0-project/eslint-formatter-gha

Folders and files

NameName
Last commit message
Last commit date
May 5, 2025
May 5, 2025
Nov 26, 2024
May 5, 2025
Nov 26, 2024
May 5, 2025
May 5, 2025
May 5, 2025
May 5, 2025
Nov 26, 2024
May 5, 2025
Dec 18, 2024
Nov 26, 2024
May 5, 2025
May 5, 2025
May 5, 2025
May 12, 2025
May 5, 2025
May 5, 2025
May 12, 2025

Repository files navigation

@ver0/eslint-formatter-gha

NPM Version NPM Downloads Dependents (via libraries.io), scoped npm package GitHub Actions Workflow Status


✍️ ESLint formatter for GitHub Actions - displays linting errors as GitHub Actions annotations

Features

  • Seamlessly converts ESLint results into GitHub Actions annotations
  • Properly formats errors, warnings, and notices based on ESLint severity levels
  • Shows rule IDs alongside error messages

Install

This package can be installed with npm, yarn, or pnpm:

# Using yarn
yarn add -D @ver0/eslint-formatter-gha

# Using npm
npm install --save-dev @ver0/eslint-formatter-gha

# Using pnpm
pnpm add -D @ver0/eslint-formatter-gha

Usage

Command Line

eslint -f @ver0/gha

In GitHub Actions Workflow

- name: Lint
  run: npx eslint . -f @ver0/gha

How It Works

This formatter converts ESLint results into GitHub Actions annotations using the @actions/core library. It maps ESLint severity levels to corresponding GitHub annotation types:

  • Severity 0 → Notice
  • Severity 1 → Warning
  • Severity 2 → Error

Requirements

  • Node.js >=18
  • ESLint

License

MIT