{"id":13531705,"url":"https://github.com/reviewdog/action-eslint","last_synced_at":"2025-04-01T20:30:28.188Z","repository":{"id":35318335,"uuid":"210385198","full_name":"reviewdog/action-eslint","owner":"reviewdog","description":"Run eslint with reviewdog","archived":false,"fork":false,"pushed_at":"2024-04-25T10:01:33.000Z","size":678,"stargazers_count":224,"open_issues_count":10,"forks_count":63,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-05-02T01:26:08.302Z","etag":null,"topics":["eslint","reviewdog"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace?type=actions\u0026query=reviewdog","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reviewdog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-23T15:07:15.000Z","updated_at":"2024-07-29T04:07:20.698Z","dependencies_parsed_at":"2024-02-05T06:04:09.537Z","dependency_job_id":"efe1cebe-5039-43f7-964a-33b19db20bd7","html_url":"https://github.com/reviewdog/action-eslint","commit_stats":{"total_commits":166,"total_committers":21,"mean_commits":7.904761904761905,"dds":0.572289156626506,"last_synced_commit":"6bf7da1c42365fabf50d681b3537377a10979aaf"},"previous_names":[],"tags_count":89,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewdog%2Faction-eslint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewdog%2Faction-eslint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewdog%2Faction-eslint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewdog%2Faction-eslint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reviewdog","download_url":"https://codeload.github.com/reviewdog/action-eslint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709921,"owners_count":20821296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eslint","reviewdog"],"created_at":"2024-08-01T07:01:05.014Z","updated_at":"2025-04-01T20:30:28.175Z","avatar_url":"https://github.com/reviewdog.png","language":"JavaScript","funding_links":[],"categories":["Community Resources","Linting \u0026 Code Quality","JavaScript","五、按场景分类的实用Action"],"sub_categories":["Static Analysis","2. 代码质量与测试"],"readme":"# GitHub Action: Run eslint with reviewdog\n\n[![depup](https://github.com/reviewdog/action-eslint/workflows/depup/badge.svg)](https://github.com/reviewdog/action-eslint/actions?query=workflow%3Adepup)\n[![release](https://github.com/reviewdog/action-eslint/workflows/release/badge.svg)](https://github.com/reviewdog/action-eslint/actions?query=workflow%3Arelease)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/reviewdog/action-eslint?logo=github\u0026sort=semver)](https://github.com/reviewdog/action-eslint/releases)\n[![action-bumpr supported](https://img.shields.io/badge/bumpr-supported-ff69b4?logo=github\u0026link=https://github.com/haya14busa/action-bumpr)](https://github.com/haya14busa/action-bumpr)\n[![Used-by counter](https://img.shields.io/endpoint?url=https://haya14busa.github.io/github-used-by/data/reviewdog/action-eslint/shieldsio.json)](https://github.com/haya14busa/github-used-by/tree/main/repo/reviewdog/action-eslint)\n\nThis action runs [eslint](https://github.com/eslint/eslint) with\n[reviewdog](https://github.com/reviewdog/reviewdog) on pull requests to improve\ncode review experience.\n\n[![github-pr-check sample](https://user-images.githubusercontent.com/3797062/65439130-a6043b80-de61-11e9-98b5-bd9567e184b0.png)](https://github.com/reviewdog/action-eslint/pull/1)\n![eslint reviewdog rdjson demo](https://user-images.githubusercontent.com/3797062/97085944-87233a80-165b-11eb-94a8-0a47d5e24905.png)\n\n## Inputs\n\n### `github_token`\n\n**Required**. Default is `${{ github.token }}`.\n\n### `level`\n\nOptional. Report level for reviewdog \\[`info`,`warning`,`error`\\].\nIt's same as `-level` flag of reviewdog.\n\n### `reporter`\n\nReporter of reviewdog command \\[`github-pr-check`,`github-check`,`github-pr-review`\\].\nDefault is `github-pr-review`.\nIt's same as `-reporter` flag of reviewdog.\n\n`github-pr-review` can use Markdown and add a link to rule page in reviewdog reports.\n\n### `filter_mode`\n\nOptional. Filtering mode for the reviewdog command \\[`added`,`diff_context`,`file`,`nofilter`\\].\nDefault is added.\n\n### `fail_level`\n\nOptional. If set to `none`, always use exit code 0 for reviewdog. Otherwise, exit code 1 for reviewdog if it finds at least 1 issue with severity greater than or equal to the given level.\nPossible values: [`none`, `any`, `info`, `warning`, `error`]\nDefault is `none`.\n\n### `fail_on_error`\n\nDeprecated, use `fail_level` instead.\nOptional. Exit code for reviewdog when errors are found \\[`true`,`false`\\]\nDefault is `false`.\n\n### `reviewdog_flags`\n\nOptional. Additional reviewdog flags\n\n### `eslint_flags`\n\nOptional. Flags and args of eslint command. Default: '.'\n\n### `workdir`\n\nOptional. The directory from which to look for and run eslint. Default '.'\n\n### `node_options`\n\nOptional. The NODE_OPTIONS environment variable to use with eslint. Default is ''.\n\n## Example usage\n\nYou also need to install [eslint](https://github.com/eslint/eslint).\n\n```shell\n# Example\n$ npm install eslint -D\n```\n\nYou can create [eslint\nconfig](https://eslint.org/docs/user-guide/configuring)\nand this action uses that config too.\n\n### [.github/workflows/reviewdog.yml](.github/workflows/reviewdog.yml)\n\n```yml\nname: reviewdog\non: [pull_request]\njobs:\n  eslint:\n    name: runner / eslint\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      pull-requests: write\n    steps:\n      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n      - uses: reviewdog/action-eslint@2fee6dd72a5419ff4113f694e2068d2a03bb35dd # v1.33.2\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          reporter: github-pr-review # Change reporter.\n          eslint_flags: \"src/\"\n```\n\nYou can also set up node and eslint manually like below.\n\n```yml\nname: reviewdog\non: [pull_request]\njobs:\n  eslint:\n    name: runner / eslint\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n      - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0\n        with:\n          node-version: \"20\"\n      - run: yarn install\n      - uses: reviewdog/action-eslint@2fee6dd72a5419ff4113f694e2068d2a03bb35dd # v1.33.2\n        with:\n          reporter: github-check\n          eslint_flags: \"src/\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freviewdog%2Faction-eslint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freviewdog%2Faction-eslint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freviewdog%2Faction-eslint/lists"}