New oxlint-config package #342
main fromrefs/pull/342/head·opened Motivation:#
Recently been using the oxc lint and formatting toolchains on my projects. They are close to supporting most common eslint plugins natively with support for the majority of the eslint js API. I wanted to add oxlint and oxfmt as tooling option in the @tanstack/cli builder tool, and since the eslint option used the tanstack/config eslint package I thought that starting here would be a good stepping stone before adding it as an option in the builder CLI
Info about rule changes
Rules not to be implemented#
no-octal- Superseded by strict mode: https://github.com/oxc-project/oxc/issues/479
Rules awaiting implementation#
no-shadow- Tracking issue: https://github.com/oxc-project/oxc/issues/479
- Implementation PR: https://github.com/oxc-project/oxc/pull/18979
@typescript-eslint/method-signature-style- Tracking issue: https://github.com/oxc-project/oxc/issues/2180
@typescript-eslint/naming-convention- This needs type-aware linting and is discussed if will be implemented or not@typescript-eslint/no-unnecessary-condition- Not listed in the tracking issue: https://github.com/oxc-project/oxc/issues/2180
Rules requiring extra TypeScript-native package#
TypeScript native (tsgo) is not released yet, so decided to not include these rules as they also require the user to add an extra oxlint-tsgolint
@typescript-eslint/no-for-in-array@typescript-eslint/no-unnecessary-type-assertion@typescript-eslint/require-await
🎯 Changes#
Adds a new oxlint-config package that can be used just like the eslint-config package.
It's almost a one-to-one copy of the @tanstack/eslint-config package with some rules omitted due to missing implementations.
Usage:
// oxlint.config.ts
import { defineConfig } from 'oxlint'
import { tanstackConfig } from '@tanstack/oxlint-config'
export default defineConfig({
extends: [tanstackConfig],
})
As far as i know does not support the .oxlintrc.json format.
✅ Checklist#
- I have followed the steps in the Contributing guide.
- I have tested this code locally with
pnpm test:pr.
🚀 Release Impact#
- This change affects published code, and I have generated a changeset.
- Doesn't effect existing packages, but i have created a changeset for a release.
- This change is docs/CI/dev-only (no release).
- 1
View your CI Pipeline Execution ↗ for commit 5c36ccd1cb926160140ee72573c3d2f4cd5aec31
Command Status Duration Result nx run-many --target=build✅ Succeeded 8s View ↗
☁️ Nx Cloud last updated this comment at
2026-03-12 22:11:14UTCHey @AleksanderEvensen , thanks for working on this! I've had the project on my radar for some time, but the lack of support for custom files (i.e. .svelte, .vue) is still a barrier. Seems like they're working on it though: https://oxc.rs/blog/2026-03-11-oxlint-js-plugins-alpha.html#what-it-can-t-do-yet
Yeh i get that the lack of support for the other custom file frameworks doesn't align with the TanStack "motto" of being framework agnostic. Fingers crossed🤞 that they can get this out soon. Loving the oxc toolchain from VoidZero so far.
If this doesn't conflict with eslint-config that it would still be quite valuable - e.g. TanStack Router/Start, the vast majority of packages are react/solid which uses just .tsx - so if eslint-config could just be used for the remainder (experimental vue support) it would still be a significant perf boost on the lion share.
Hey @AleksanderEvensen the whole point of oxlint originally was to be run alongside eslint, not replace it. It was a perf accelerator. Having used oxlint extensively for the last 6 months, the performance improvement over eslint is significant, and it would be useful to add an oxlint config. @birkskyum do you think you could update this pr to wire in eslint-plugin-oxlint ?
Sign in to join this conversation.
🦋 Changeset detected#
Latest commit: 5c36ccd1cb926160140ee72573c3d2f4cd5aec31
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR