-
-
Notifications
You must be signed in to change notification settings - Fork 56
oxlint JS plugins blog post #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
91c25a7
to
ae91723
Compare
✅ Deploy Preview for oxc-project ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
ae91723
to
b860331
Compare
b860331
to
346ab85
Compare
Run Oxlint: | ||
|
||
```sh | ||
pnpm oxlint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be pnpx
? or should it be clear that oxlint
is a script in the package.json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm dlx actually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to inform design for Oxlint support for custom JS plugins. Today, we are pleased to announce the result of many months | ||
of research, prototyping, and finally building: | ||
|
||
**Oxlint supports plugins written in JS!** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also add the eslint compat here in the headline?
- Performance is good, but it's going to get _way_ better - we have many optimizations in the pipeline. | ||
|
||
The most commonly-used APIs for code-checking rules [are implemented](#features), so many existing ESLint rules will already work. | ||
But token-related APIs are absent, so stylistic (formatting) rules will not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mention antfu config here briefly & plans?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small remarks only
we're going to fix these in a follow up so the blog post is there and published in time for the talk |
Draft blog post announcing Oxlint JS plugins.
It's not quite as polished as I'd like it to be, but we need to get it out, and I've run out of time, having prioritised getting the selectors DSL implemented.
The benchmarks are a bit weird, for 2 reasons:
In other rough benchmarks, we've seen JS plugins have a much higher cost. These benchmark numbers were originally from Cam's laptop, and I've replicated the result on my MacBook Air M3. But I ran into the same problem I had before that adding a JS plugin actually improves performance. This is clearly a nonsense - that's a side effect of either reduced file system contention, or some oddity of thread scheduling on M-series chips with efficiency cores. But getting to the bottom of that would take days, or maybe even weeks.
Oxlint is coming out at only 10x faster than ESLint. I think we'd expect a lot more than that. As a guess, it might be that ESLint in this case is not generating any errors, whereas Oxlint generates ~200 diagnostics. Printing diagnostics is really slow.
I actually don't think it matters that much if they're not super-scientific. Obviously, the performance is going to vary a lot depending on how many plugins, and how complex they are.
The benchmarks do still represent the thrust of the truth:
In my opinion, I don't think it's going to be possible to get a more solid benchmark in a reasonable amount of time, so our choices are: either go with them or, if we're uncomfortable with how unscientific it is, just remove them.
The main point of the blog post is the feature, not the performance.