Registry / devops / eslint-formatter-github-annotations

eslint-formatter-github-annotations

JSON →
library0.1.0jsnpmunverified

An ESLint formatter that outputs lint results as GitHub Checks annotations, enabling inline code annotations in GitHub Actions pull request checks. Version 0.1.0, released as an early-stage package with no reported release cadence. Unlike other ESLint formatters (e.g., json, stylish), this one specifically targets CI integration with GitHub Actions to display warnings/errors directly in pull request diffs. It supports reporting multiple messages per file and uses the standard ESLint formatter API. Potential alternative: @eslint/skip-annotations is more mature but limited to specific use cases.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ESM only; CommonJS require() fails. Use import statement.

import formatter from 'eslint-formatter-github-annotations'

The formatter name is 'github-annotations' (not the package name). Use -f github-annotations.

npx eslint -f github-annotations .

Dynamic import in ESM; CommonJS require() throws error.

const formatter = await import('eslint-formatter-github-annotations')

An example package.json configuration to run ESLint with the GitHub annotations formatter, which will produce annotations in GitHub Actions logs.

{ "name": "example-lint", "version": "1.0.0", "scripts": { "lint": "eslint -f github-annotations ." }, "devDependencies": { "eslint": "^8.0.0", "eslint-formatter-github-annotations": "^0.1.0" } }
Debug
Known footguns
gotchaThe formatter name is 'github-annotations', not the package name. Using -f eslint-formatter-github-annotations will fail.
breakingThis package is ESM-only. Attempting to require() it in CommonJS will throw an error.
gotchaRunning this formatter outside of a GitHub Actions environment may produce no output or unexpected results, as it relies on GitHub-specific annotation format.
gotchaESLint must be present as a peer dependency. If ESLint is not installed, the formatter will fail to load.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
12 hits · last 30 days
gptbot
3
bingbot
2
ahrefsbot
2
chatgpt-user
1
Resources