Skip to content

Migrate to oxlint#66

Merged
Andarist merged 5 commits into
changesets:mainfrom
ocavue-forks:ocavue/oxlint
May 19, 2026
Merged

Migrate to oxlint#66
Andarist merged 5 commits into
changesets:mainfrom
ocavue-forks:ocavue/oxlint

Conversation

@ocavue
Copy link
Copy Markdown
Contributor

@ocavue ocavue commented May 18, 2026

Migrate ESLint to oxlint

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 18, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedoxlint@​1.64.0991009196100
Addedoxlint-tsgolint@​0.22.11001009796100

View full report

Comment thread tsconfig.json
Comment on lines +4 to +5
"types": ["node"],
"rootDir": ".",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note for reviewers:

oxlint-tsgolint requests these changes. We will need them anyway when we update TS5 to TS6.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it would be good to recheck if the built dist files are correct after this change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I checked, and the dist/ output looks fine. We are using tsup (and very soon tsdown) for generating dist/, and they won't be affected by the rootDir config (unlike tsc).

Comment thread .eslintrc.js
globals: {
React: true,
JSX: true,
},
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note for reviewers:

We're not using React in this project.

Comment thread .oxlintrc.json
Comment on lines +8 to +16
"plugins": [
"eslint",
"typescript",
"unicorn",
"oxc",
"import",
"node",
"vitest"
],
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note for reviewers:

I enabled all default plugins, plus some other useful plugins. See https://oxc.rs/docs/guide/usage/linter/plugins.html#supported-plugins for a full list of plugins.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I prefer to not have unicorn since it's a bunch of random lints but since it doesn't affect any code right now I'm fine with it.

@ocavue ocavue marked this pull request as ready for review May 18, 2026 10:00
Comment thread package.json
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-only-warn": "^1.1.0",
"oxlint": "^1.63.0",
"oxlint-tsgolint": "^0.22.1",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

hm, I think we are still not using TS Go (deliberately) in the main repo - perhaps it would be best to match the main repo for now and upgrade all repos at once at some point

Copy link
Copy Markdown
Contributor Author

@ocavue ocavue May 18, 2026

Choose a reason for hiding this comment

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

I want to enable type-aware linting so that I can find more errors, like the floating promise issue (e.g., missing await) that I have fixed, as shown in this PR.

For type-aware linting on ESLint, we can just enable type-aware linting with the already installed TypeScript v5 by enabling projectService.

For type-aware linting on oxlint, we have to install oxlint-tsgolint.

Just to be clear, installing oxlint-tsgolint won't install tsgo (@typescript/native-preview) in our repo. oxlint-tsgolint itself bundles the code from tsgo. Therefore, we won't have two different TypeScript versions installed in the repo.

@Andarist Andarist requested a review from beeequeue May 18, 2026 10:07
@ocavue ocavue requested a review from bluwy as a code owner May 18, 2026 10:25
bluwy
bluwy previously approved these changes May 18, 2026
Copy link
Copy Markdown
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

Looks good to me. I clicked "approve workflow runs" but I think it'll be expected to fail for the integration tests as this PR is from a fork.

# Conflicts:
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
bluwy
bluwy previously approved these changes May 19, 2026
Comment thread pnpm-workspace.yaml
dedupePeerDependents: true
minimumReleaseAge: 10080
shellEmulator: true
trustPolicy: no-downgrade
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why the change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My bad. I was thinking of adding back trustPolicy: no-downgrade during the conflict merging process, but I somehow removed it 🤦

Let me revert it.

@Andarist Andarist enabled auto-merge May 19, 2026 08:44
@Andarist Andarist disabled auto-merge May 19, 2026 08:45
@Andarist Andarist merged commit 07cad02 into changesets:main May 19, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants