Cam McHenry
@camchenry.com
460 followers 290 following 100 posts
dad | software engineer @github.com | core team member of oxc.rs | ✝️ camchenry.com
Posts Media Videos Starter Packs
camchenry.com
must-use-promises? I feel like misused promises could be broken into separate rules like: no-unawaited-conditions, no-await-void-return, no-spread-promises. It's felt like 3 separate rules to me when reading the docs and configuring
camchenry.com
Just finished writing up an auto-fix for this in Oxlint, in case this was a blocker for anyone: github.com/oxc-project/...
camchenry.com
Oh no, that sounds exhausting. Compared to C, I feel like my brain is already adapting to this style. Having all of the type declarations be extremely uniform is really nice for reducing cognitive load.
camchenry.com
Heh, if I never have to apply the spiral rule ever again, it will be too soon.
camchenry.com
I'm finally starting to pick up Go and try to formally learn it. It's got a lot of wild features! First language I've used in quite a while that natively supports complex numbers, seems like an interesting choice. The swapped type declaration order is gonna take a while to get used to.
camchenry.com
First of these optimizations rolled out in v1.15.0 with a reduced scope. Next version of oxlint will be even faster: github.com/oxc-project/...

On my laptop: ~15% faster on `oven-sh/bun`, ~9% faster on `microsoft/vscode`, ~11% faster on `posthog/posthog`, and ~8% faster on `elastic/kibana`
Reposted by Cam McHenry
voidzero.dev
VoidZero x SquiggleConf: Win a ticket!

VoidZero is a proud sponsor of this year's @squiggleconf.com on September 18th and 19th in Boston.

We've got an extra ticket for the event and want to give it away to one of you so you can join us there!

Learn in this thread how you can enter the raffle 👇
Post image saying "VoidZero is sponsoring SquiggleConf 2025"
camchenry.com
Really excited for the new LSP snapshot model! I think this will fix the non-deterministic behavior we've seen with concurrent tsgolint 🤞
camchenry.com
I was not aware of that, good to know! Seems like a good general optimization trick. I wonder if we could use it for our oxc transformer and minifier too.
camchenry.com
We don't collect any telemetry, so doing end-to-end tests is the way to go. We do run oxlint on a number of notable repositories for testing purposes to try and catch this sort of thing: github.com/oxc-project/...
GitHub - oxc-project/oxlint-ecosystem-ci: Oxlint Ecosystem CI
Oxlint Ecosystem CI. Contribute to oxc-project/oxlint-ecosystem-ci development by creating an account on GitHub.
github.com
camchenry.com
An ideal example is something like `no-debugger`: oxc.rs/docs/guide/u..., since 99% of files don't include debugger statements, it can almost always be skipped.

An import-related example rule would be something like `typescript/no-import-type-side-effects`: oxc.rs/docs/guide/u....
The JavaScript Oxidation Compiler
A collection of high-performance JavaScript tools written in Rust
oxc.rs
camchenry.com
It was pretty surprising to us too, actually. I created a tool for analyzing AST node type frequencies in projects. Even in large projects, common things like import statements don't appear in ~15% of files, so we can skip import-related rules for those files.

gist.github.com/camchenry/54...
AST Analysis of a large non-public codebase by @tomgasson, output from https://github.com/camchenry/ast-analysis
AST Analysis of a large non-public codebase by @tomgasson, output from https://github.com/camchenry/ast-analysis - ast-analysis.txt
gist.github.com
camchenry.com
Yes 😅 What you described is pretty accurate to the changes we're trying to make. We keep a mapping of (node type) -> rules so we can quickly fetch all the rules that care about that node. The main innovation is being able to quickly determine if a file contains any given node type ahead of time.
camchenry.com
github.com/oxc-project/...

Note that this is still very much a work in progress. Probably won't be merged for a bit as the hard part is ensuring correctness when skipping rules.
wip: skip rules that do not have any relevant node types by camchenry · Pull Request #13138 · oxc-project/oxc
github.com
camchenry.com
Trying some new oxlint optimizations. This PR has gone over several iterations in the last few months and the core idea is simple: don't run rules for files if they don't apply (using an AST node bitset lookup).

The result: linting is around 15% faster in practice.
Oxlint linter CodSpeed benchmark showing 65-84% performance improvements A hyperfine CLI benchmark showing that linting the vscode repository is around 17% faster. A hyperfine CLI benchmark showing that linting the kibana repository is around 17% faster.
camchenry.com
Cool to see more tsgo-based linters! I think best practices here are not known yet, so it is great to see more teams innovating on this.
rspack.dev
Rspack @rspack.dev · Aug 15
We have a new member in the Rstack family 🦀

Introducing Rslint - a TypeScript-first linter written in Go (powered by typescript-go, not Rust 🙃)

Currently in experimental stage - check out the repo's README for more details:

github.com/web-infra-de...
GitHub - web-infra-dev/rslint: 🚀 Go Faster. Go Typed
🚀 Go Faster. Go Typed. Contribute to web-infra-dev/rslint development by creating an account on GitHub.
github.com
camchenry.com
It's a convention in oxlint. When it's a ported rule, we normally call the rule origin by what the plugin was called. In this case the rule originated from typescript-eslint even though it's implemented in Go.
camchenry.com
Yes! It spawns a separate process and then passes the diagnostics back to oxlint.
camchenry.com
Just had a listen to this, it's well worth listening to catch up on the current state of JS linting, as Josh has lots of experience from working on ts-eslint. Lots of innovation happening in linting currently

Overall, I think right now is a great time to learn more about linting, parsing, and ASTs.
joshuakgoldberg.com
This is one of my favorite podcast episodes I've ever been on. I love this conversation and the points covered: linting in 2025, performance vs. devX tradeoffs, and all sorts of interesting dives into architectures.

If you never thought you should care about your linter, this will blow your mind! 🧠
typescript.fm
Today on the pod: Joshua Goldberg breaks down the latest TypeScript linters, how to pick the right one, and best practices for 2025. #typescript
camchenry.com
First version is out! It's still pretty experimental, but we will keep improving performance and fixing bugs with each version. Most importantly though: you can use it now!
boshen.github.io
`oxlint --type-aware`. Mic drop.

It's incomplete and have numerous problems, including a noticeable performance issue.

BUT, you can finally see your floating promises quickly!

Example PR: github.com/rolldown/rol...
Problems: t.co/K7ZVnPjOPL
Reposted by Cam McHenry
boshen.github.io
`oxlint --type-aware`. Mic drop.

It's incomplete and have numerous problems, including a noticeable performance issue.

BUT, you can finally see your floating promises quickly!

Example PR: github.com/rolldown/rol...
Problems: t.co/K7ZVnPjOPL
camchenry.com
It's been great to work on prototyping this! I'm really excited by typescript-go and looking forward to getting this released as soon as we can. The future is fast ⚡️
boshen.github.io
oxlint + tsgolint = no slow down!

no-floating-promises completes 4.4k files in 3.2 seconds, in the vscode repo.

typescript-go is the future, all credits to the ts-go team! We just glued everything together 😀

github.com/microsoft/ty...
Reposted by Cam McHenry
boshen.github.io
I am permitted to host tsgolint in Oxc and explore type aware linting!

I am super excited!

We reduced the original scope of tsgolint to be a backend for oxlint, taking the best out of both worlds!

github.com/oxc-project/...
GitHub - oxc-project/tsgolint: Type aware linting for oxlint
Type aware linting for oxlint. Contribute to oxc-project/tsgolint development by creating an account on GitHub.
github.com