Skip to content
Closed
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
91c89de
Add design spec for oxlint migration
geoffharcourt Apr 22, 2026
dc3fbc1
Add implementation plan for oxlint migration
geoffharcourt Apr 22, 2026
8936ddf
feat(converter): scaffold module with severity mapping
geoffharcourt Apr 22, 2026
fbb468a
feat(converter): extract rule code from plugin(rule) format
geoffharcourt Apr 22, 2026
cfe9aca
feat(converter): byte-offset to line/column for single-line input
geoffharcourt Apr 22, 2026
64d0314
test(converter): cover multi-line, boundary, and UTF-8 offset cases
geoffharcourt Apr 22, 2026
9a762bc
feat(converter): transform one oxlint diagnostic to rdjsonl
geoffharcourt Apr 22, 2026
4df1c64
test(converter): edge cases for convertDiagnostic
geoffharcourt Apr 22, 2026
d14d68b
feat(converter): convert a list of diagnostics
geoffharcourt Apr 22, 2026
b490a68
feat(converter): CLI entrypoint reading stdin, writing rdjsonl
geoffharcourt Apr 22, 2026
2605c6c
fix(converter): accept oxlint's real JSON shape, cache file reads
geoffharcourt Apr 22, 2026
7f18352
feat(action): rename inputs eslint_flags -> oxlint_flags, drop node_o…
geoffharcourt Apr 22, 2026
e34d401
feat(action): swap eslint pipeline for oxlint + rdjsonl converter
geoffharcourt Apr 22, 2026
ceb1134
chore: remove bundled eslint-formatter-rdjson
geoffharcourt Apr 22, 2026
44030c3
chore: remove repo-root eslint config and package manifest
geoffharcourt Apr 22, 2026
789c2c8
chore: add repo-root oxlint config for test fixtures
geoffharcourt Apr 22, 2026
68ed96e
test: rewrite testdata fixtures for oxlint's default rules
geoffharcourt Apr 22, 2026
2d56598
test(subproject): migrate to oxlint, regenerate lockfile
geoffharcourt Apr 22, 2026
0853d22
ci: run converter unit tests via node --test
geoffharcourt Apr 22, 2026
b70384a
ci(reviewdog): exercise action with oxlint across node matrix
geoffharcourt Apr 22, 2026
5edd138
ci: remove npm-publish workflow (no npm package to publish)
geoffharcourt Apr 22, 2026
87e917b
docs: rewrite README for oxlint
geoffharcourt Apr 22, 2026
c6df9ef
fix(action): skip npm install when oxlint is already available
geoffharcourt Apr 22, 2026
fbff263
chore: remove superpowers specs and plans
geoffharcourt Apr 22, 2026
dbeb439
chore(action): update author to credit fork lineage
geoffharcourt Apr 22, 2026
9bb3b95
docs: remove badges pointing to upstream workflows
geoffharcourt Apr 22, 2026
3915180
docs: point usage examples at commonlit/action-eslint
geoffharcourt Apr 22, 2026
eb5c587
docs: restore pinned SHAs on actions/checkout and setup-node in first…
geoffharcourt Apr 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .eslintrc.js

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/npm-publish.yml

This file was deleted.

36 changes: 19 additions & 17 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: reviewdog
on: [pull_request]
jobs:
eslint:
name: runner / eslint
oxlint:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This action is used for testing, it's not the actual action that gets run in repo use.

name: runner / oxlint
runs-on: ubuntu-latest

strategy:
Expand All @@ -19,39 +19,41 @@ jobs:
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node_version }}
- name: eslint-github-pr-check
- name: install oxlint for root fixtures
run: npm install --no-save oxlint
- name: oxlint-github-pr-check
uses: ./
with:
tool_name: eslint-github-pr-check
tool_name: oxlint-github-pr-check
reporter: github-pr-check
level: info
eslint_flags: "testdata/ --ignore-pattern /test-subproject/"
- name: eslint-github-check
oxlint_flags: "--config .oxlintrc.json testdata/"
- name: oxlint-github-check
uses: ./
with:
tool_name: eslint-github-check
tool_name: oxlint-github-check
reporter: github-check
level: warning
eslint_flags: "testdata/ --ignore-pattern /test-subproject/"
- name: eslint-github-pr-review
oxlint_flags: "--config .oxlintrc.json testdata/"
- name: oxlint-github-pr-review
uses: ./
with:
tool_name: eslint-github-pr-review
tool_name: oxlint-github-pr-review
reporter: github-pr-review
eslint_flags: "testdata/ --ignore-pattern /test-subproject/"
- name: eslint-subproject-github-pr-review
oxlint_flags: "--config .oxlintrc.json testdata/"
- name: oxlint-subproject-github-pr-review
uses: ./
with:
tool_name: eslint-subproject-github-pr-review
tool_name: oxlint-subproject-github-pr-review
reporter: github-pr-review
workdir: ./test-subproject
eslint_flags: "sub-testdata/"
- name: eslint-subproject
oxlint_flags: "sub-testdata/"
- name: oxlint-subproject
uses: ./
with:
tool_name: eslint-subproject
tool_name: oxlint-subproject
workdir: ./test-subproject
eslint_flags: "sub-testdata/"
oxlint_flags: "sub-testdata/"
reporter: github-check
level: warning
filter_mode: file
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ jobs:
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "24"
cache: "npm"
- run: npm ci
- name: Test eslint-formatter-rdjson
run: ./eslint-formatter-rdjson/test.sh
- name: Converter unit tests
run: node --test oxlint-to-rdjsonl.test.js
12 changes: 12 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
"rules": {
"no-unused-vars": "error",
"no-var": "error",
"no-empty": "warn"
},
"ignorePatterns": [
"test-subproject/",
"node_modules/"
]
}
118 changes: 47 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,138 +1,114 @@
# GitHub Action: Run eslint with reviewdog
# GitHub Action: Run oxlint with reviewdog

[![depup](https://github.com/reviewdog/action-eslint/workflows/depup/badge.svg)](https://github.com/reviewdog/action-eslint/actions?query=workflow%3Adepup)
[![release](https://github.com/reviewdog/action-eslint/workflows/release/badge.svg)](https://github.com/reviewdog/action-eslint/actions?query=workflow%3Arelease)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/reviewdog/action-eslint?logo=github&sort=semver)](https://github.com/reviewdog/action-eslint/releases)
[![action-bumpr supported](https://img.shields.io/badge/bumpr-supported-ff69b4?logo=github&link=https://github.com/haya14busa/action-bumpr)](https://github.com/haya14busa/action-bumpr)
[![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)

This action runs [eslint](https://github.com/eslint/eslint) with
This action runs [oxlint](https://oxc.rs/docs/guide/usage/linter.html) with
[reviewdog](https://github.com/reviewdog/reviewdog) on pull requests to improve
code review experience.

[![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)
![eslint reviewdog rdjson demo](https://user-images.githubusercontent.com/3797062/97085944-87233a80-165b-11eb-94a8-0a47d5e24905.png)
## Migrating from older versions of this action (eslint)

Earlier versions of this action ran eslint. Starting with the oxlint rewrite,
the following breaking changes apply:

- `eslint_flags` input → `oxlint_flags`.
- `node_options` input removed (oxlint is a native binary; `NODE_OPTIONS` has no effect).
- `tool_name` default changed from `eslint` to `oxlint`.
- You must list `oxlint` (not `eslint`) in your project's `devDependencies` (or equivalent).

## Inputs

### `github_token`

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

### `level`

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

### `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.
Optional. `github-pr-check`, `github-check`, or `github-pr-review`. Default `github-pr-review`.

### `tool_name`

Optional. Tool name to use for reviewdog reporter. Default is `eslint`.
This becomes the check/run name on GitHub (e.g., for `github-check`/`github-pr-check`) and the tool label in review comments.
Useful when running in a matrix to distinguish checks, e.g. `eslint-${{ matrix.node_version }}`.
Optional. Default `oxlint`. Becomes the check/run name on GitHub and the tool label in review comments.

### `filter_mode`

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

### `fail_level`

Optional. 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.
Possible values: [`none`, `any`, `info`, `warning`, `error`]
Default is `none`.
Optional. `none`, `any`, `info`, `warning`, or `error`. Default `none`.

### `fail_on_error`

Deprecated, use `fail_level` instead.
Optional. Exit code for reviewdog when errors are found \[`true`,`false`\]
Default is `false`.
Deprecated. Use `fail_level`.

### `reviewdog_flags`
Optional. Additional flags passed to reviewdog.

Optional. Additional reviewdog flags

### `eslint_flags`

Optional. Flags and args of eslint command. Default: '.'
### `oxlint_flags`
Optional. Flags and args for the `oxlint` 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 ''.
Optional. Directory from which to run oxlint. Default `.`.

## Example usage

You also need to install [eslint](https://github.com/eslint/eslint).
Install oxlint in your project:

```shell
# Example
$ npm install eslint -D
npm install --save-dev oxlint
```

You can create [eslint
config](https://eslint.org/docs/user-guide/configuring)
and this action uses that config too.
See the [oxlint configuration docs](https://oxc.rs/docs/guide/usage/linter/config.html)
for creating a `.oxlintrc.json`. This action uses that config automatically.

### [.github/workflows/reviewdog.yml](.github/workflows/reviewdog.yml)
### `.github/workflows/reviewdog.yml`

```yml
```yaml
name: reviewdog
on: [pull_request]
jobs:
eslint:
name: runner / eslint
oxlint:
name: runner / oxlint
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: reviewdog/action-eslint@2fee6dd72a5419ff4113f694e2068d2a03bb35dd # v1.33.2
- uses: actions/checkout@v4
- uses: reviewdog/action-eslint@vX
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review # Change reporter.
eslint_flags: "src/"
reporter: github-pr-review
oxlint_flags: "src/"
```

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

```yml
```yaml
name: reviewdog
on: [pull_request]
jobs:
eslint:
name: runner / eslint
oxlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: yarn install
- uses: reviewdog/action-eslint@2fee6dd72a5419ff4113f694e2068d2a03bb35dd # v1.33.2
- run: npm install
- uses: reviewdog/action-eslint@vX
with:
reporter: github-check
eslint_flags: "src/"
oxlint_flags: "src/"
```

### Matrix example with unique tool name

```yml
```yaml
name: reviewdog
on: [pull_request]
jobs:
eslint:
oxlint:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -142,10 +118,10 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: reviewdog/action-eslint@v1
- uses: reviewdog/action-eslint@vX
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
tool_name: eslint-node-${{ matrix.node }}
eslint_flags: "src/"
tool_name: oxlint-node-${{ matrix.node }}
oxlint_flags: "src/"
```
21 changes: 7 additions & 14 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Run eslint with reviewdog'
description: '🐶 Run eslint with reviewdog on pull requests to improve code review experience.'
name: 'Run oxlint with reviewdog'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual production action definition.

description: '🐶 Run oxlint with reviewdog on pull requests to improve code review experience.'
author: 'haya14busa (reviewdog)'
inputs:
github_token:
Expand Down Expand Up @@ -41,42 +41,35 @@ inputs:
description: 'Additional reviewdog flags'
required: false
default: ''
eslint_flags:
description: "flags and args of eslint command. Default: '.'"
oxlint_flags:
description: "flags and args of oxlint command. Default: '.'"
required: false
default: '.'
workdir:
description: "The directory from which to look for and run eslint. Default '.'"
description: "The directory from which to look for and run oxlint. Default '.'"
required: false
default: '.'
tool_name:
description: 'Tool name to use for reviewdog reporter'
required: false
default: 'eslint'
node_options:
description: 'NODE_OPTIONS for running eslint'
required: false
default: ''
default: 'oxlint'
runs:
using: 'composite'
steps:
- run: $GITHUB_ACTION_PATH/script.sh
shell: bash
env:
REVIEWDOG_VERSION: v0.21.0
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
INPUT_GITHUB_TOKEN: ${{ inputs.github_token }}
INPUT_LEVEL: ${{ inputs.level }}
INPUT_REPORTER: ${{ inputs.reporter }}
INPUT_FILTER_MODE: ${{ inputs.filter_mode }}
INPUT_FAIL_LEVEL: ${{ inputs.fail_level }}
INPUT_FAIL_ON_ERROR: ${{ inputs.fail_on_error }}
INPUT_REVIEWDOG_FLAGS: ${{ inputs.reviewdog_flags }}
INPUT_ESLINT_FLAGS: ${{ inputs.eslint_flags }}
INPUT_OXLINT_FLAGS: ${{ inputs.oxlint_flags }}
INPUT_WORKDIR: ${{ inputs.workdir }}
INPUT_TOOL_NAME: ${{ inputs.tool_name }}
NODE_OPTIONS: ${{ inputs.node_options }}
branding:
icon: 'alert-octagon'
color: 'blue'
Loading