• Stars
    star
    232
  • Rank 172,847 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 5 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Run eslint with reviewdog

GitHub Action: Run eslint with reviewdog

Docker Image CI depup release GitHub release (latest SemVer) action-bumpr supported

This action runs eslint with reviewdog on pull requests to improve code review experience.

github-pr-check sample eslint reviewdog rdjson demo

Inputs

github_token

Required. Default is ${{ github.token }}.

level

Optional. Report level for reviewdog [info,warning,error]. It's same as -level flag of reviewdog.

reporter

Reporter of reviewdog command [github-pr-check,github-check,github-pr-review]. Default is github-pr-review. It's same as -reporter flag of reviewdog.

github-pr-review can use Markdown and add a link to rule page in reviewdog reports.

filter_mode

Optional. Filtering mode for the reviewdog command [added,diff_context,file,nofilter]. Default is added.

fail_on_error

Optional. Exit code for reviewdog when errors are found [true,false] Default is false.

reviewdog_flags

Optional. Additional reviewdog flags

eslint_flags

Optional. Flags and args of eslint command. Default: '.'

workdir

Optional. The directory from which to look for and run eslint. Default '.'

node_options

Optional. The NODE_OPTIONS environment variable to use with eslint. Default is ''.

Example usage

You also need to install eslint.

# Example
$ npm install eslint -D

You can create eslint config and this action uses that config too.

.github/workflows/reviewdog.yml

name: reviewdog
on: [pull_request]
jobs:
  eslint:
    name: runner / eslint
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write 
    steps:
      - uses: actions/checkout@v2
      - uses: reviewdog/action-eslint@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          reporter: github-pr-review # Change reporter.
          eslint_flags: 'src/'

You can also set up node and eslint manually like below.

name: reviewdog
on: [pull_request]
jobs:
  eslint:
    name: runner / eslint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: '14'
      - run: yarn install
      - uses: reviewdog/action-eslint@v1
        with:
          reporter: github-check
          eslint_flags: 'src/'

More Repositories

1

reviewdog

🐢 Automated code review tool integrated with any code analysis tools regardless of programming language
Go
7,891
star
2

action-golangci-lint

Run golangci-lint with reviewdog
TypeScript
217
star
3

errorformat

Vim's quickfix errorformat implementation in Go
Go
108
star
4

action-tflint

Run tflint with reviewdog on pull requests to enforce best practices
Shell
105
star
5

action-rubocop

Run rubocop with reviewdog 🐢
Shell
99
star
6

action-shellcheck

Run shellcheck with reviewdog
Shell
91
star
7

action-misspell

Run misspell with reviewdog
Shell
88
star
8

action-suggester

🐢 Suggests any code changes based on diff through GitHub Multi-line code suggestions by using reviewdog
Shell
74
star
9

action-actionlint

run actionlint with reviewdog
Dockerfile
73
star
10

action-tfsec

Run tfsec with reviewdog on pull requests to enforce security best practices
Shell
70
star
11

action-stylelint

Run stylelint with reviewdog
Shell
47
star
12

action-setup

🐢 Setup reviewdog action
Shell
42
star
13

action-hadolint

Run hadolint with reviewdog 🐢
Shell
42
star
14

action-languagetool

Run languagetool with reviewdog 🐢
Shell
39
star
15

action-brakeman

Run brakeman with reviewdog 🐢
Shell
31
star
16

action-detect-secrets

GitHub Action: Run detect-secrets with reviewdog
Python
21
star
17

action-staticcheck

🐢 Run staticcheck with reviewdog on pull requests to improve code review experience.
Shell
19
star
18

action-depup

Action which updates dependencies automatically
Shell
18
star
19

action-template

🐢 Template to create your reviewdog actions
Shell
17
star
20

action-markdownlint

Run markdownlint with reviewdog
Shell
16
star
21

action-ansiblelint

Run ansible-lint with reviewdog πŸ•
Shell
13
star
22

action-yamllint

Run yamllint with reviewdog
Shell
12
star
23

errorformat-playground

Playground of https://github.com/reviewdog/errorformat
JavaScript
11
star
24

action-cpplint

Run cpplint with reviewdog
Shell
11
star
25

action-vint

Run vint with reviewdog
Dockerfile
10
star
26

action-nimlint

Run nim check with reviewdog
Shell
9
star
27

action-trivy

Shell
9
star
28

action-alex

🐢 Runs alex with reviewdog 🐢
Shell
8
star
29

action-reek

Run reek with reviewdog 🐢
Shell
8
star
30

action-shfmt

Run shfmt with reviewdog
Shell
7
star
31

action-black

Run black with Reviewdog 🐢
Shell
7
star
32

inviter

Invite contributors to @reviewdog org automatically
Go
5
star
33

action-eclint

Run eclint with reviewdog
Shell
5
star
34

action-pyflakes

Run pyflakes with reviewdog 🐢
Dockerfile
4
star
35

action-remark-lint

Run remark-lint with Reviewdog 🐢
Shell
4
star
36

action-composite-template

🐢 Template to create your composite action based reviewdog actions
Shell
4
star
37

action-ast-grep

🐢 Run ast-grep(sg) with reviewdog
Shell
2
star
38

action-regal

🐢 Run regal with reviewdog
Shell
2
star
39

action-pytest

(WIP) Run pytest with Reviewdog 🐢
Shell
1
star
40

action-terraform-validate

🐢 Run terraform validate with reviewdog
Shell
1
star