Skip to content
This repository has been archived by the owner on Nov 20, 2019. It is now read-only.
/ eslint-action Public archive

Github Action to run ESLint on your codebase (+ check annotations)

License

Notifications You must be signed in to change notification settings

rkusa/eslint-action

Repository files navigation

Does not work with the release version of Github actions anymore, use Problem Matchers instead.


Github Action for ESLint (with Annotations)

This Action runs ESLint on your codebase and adds annotations to the Github check the action is run in.

Annotaiton Example: https://github.com/rkusa/eslint-action-example/pull/1/files

Annotation Example

Usage

workflow "Lint" {
  on = "push"
  resolves = ["Eslint"]
}

action "Dependencies" {
  uses = "actions/npm@master"
  args = "install"
}

action "Eslint" {
  uses = "docker://rkusa/eslint-action:latest"
  secrets = ["GITHUB_TOKEN"]
  args = ""
  needs = ["Dependencies"]
}

Secrets

  • GITHUB_TOKEN - Required. Required to add annotations to the check that is executing the Github action.

Environment variables

  • ESLINT_CMD - Optional. The path the ESLint command - defaults to ./node_modules/.bin/eslint.

Example

To run ESLint, either use the published docker image ...

action "Eslint" {
  uses = "docker://rkusa/eslint-action:latest"
  secrets = ["GITHUB_TOKEN"]
  args = ""
}

... or the Github repo:

action "Eslint" {
  uses = "rkusa/eslint-action@master"
  secrets = ["GITHUB_TOKEN"]
  args = ""
}

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

Container images built with this project include third party materials. View license information for Node.js, Node.js Docker project, ESLint, Go, google/go-github or ldez/ghactions. As with all Docker images, these likely also contain other software which may be under other licenses. It is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

About

Github Action to run ESLint on your codebase (+ check annotations)

Resources

License

Stars

Watchers

Forks

Packages

No packages published