JSPM

@firmnav/eslint-github-actions-formatter

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5287
  • Score
    100M100P100Q141769F
  • License ISC

Formatter for ESLInt that outputs GitHub Actions annotations

Package Exports

  • @firmnav/eslint-github-actions-formatter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@firmnav/eslint-github-actions-formatter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

eslint-github-actions-formatter

ESLint formatter to create annotations when running tests in GitHub Actions.

Installation

Add the package as a development dependency

npm:

npm install --save-dev @firmnav/eslint-github-actions-formatter

yarn:

yarn add --dev @firmnav/eslint-github-actions-formatter

Usage

Assuming you have a lint command in your package.json simply add the -f flag pointing to the formatter.

{
    ...
    "scripts": {
        "build": "...",
        "lint": "eslint 'src/**/*.{js,ts,tsx}' -f ./node_modules/@firmnav/eslint-github-actions-formatter/dist/formatter.js",
        "test": "..."
    }
}

Then you can run your lint command as you would do normally:

$ npm run lint

Alternativly move the -f flag to where you invoke your lint command if you only want to use the formatter certain places, like CI.

$ npm run lint -f ./node_modules/@firmnav/eslint-github-actions-formatter/dist/formatter.js