Cam McHenry

@camchenry.com

dad | software engineer @github.com | core team member of oxc.rs | ✝️ camchenry.com

Against my better judgment, I have started a side project that is probably impossible to achieve practically. I'm gonna try anyway. Hopefully I will learn a lot 😅

we recently added rule timing support to oxlint to help triage performance issues. try running with `--debug=timings` to see the slowest built-in rules. support for type-aware/JS plugins will be supported in the future too.

results of running "pnpx oxlint --debug=timings --silent" on the actualbudget/actual repository. It says "Found 22 warnings and 0 errors. Finished in 7.5s on 1805 files using 8 threads." and then includes a rule timings table that lists the slowest rules from slowest to fastest. Each row includes the rule name, time it took to run in milliseconds, relative time, number of times called, and where the rule comes from (source). For example, the eslint/no-unused-vars rule took 297ms (26.8% of total), and was called 1,805 times and is a native rule.

I have now replaced ESLint with Oxlint in the DebtBook Rails/React codebase 🫡 ESLint ran in 20s with full cache, 230s without cache. And somewhere in between very randomly depending on the changes made. Oxlint - with type-aware, a JS Plugin, and more than 250 rules - runs in around 8 seconds :)

Really interesting research from auvred on type-aware linting: github.com/auvred/hybri... This is the next frontier for developer tooling: cross-language interoperability and finding the right tradeoffs to make for extensibility/performance.

GitHub - auvred/hybrid-type-aware-linting-performance: Performance evaluation of different approaches for bridging tsgo with JS

Performance evaluation of different approaches for bridging tsgo with JS - auvred/hybrid-type-aware-linting-performance

github.com

Fun story from today. I'm currently trying to get `--strict` on by default in TypeScript 6.0. Our test suite has many tests which are written with `--strict false`, so I am updating them by adding a special comment our test suite recognizes for options // @strict: false However...

Test where `// @strict: false` has been added to the beginning of the file.

This has been in the works for a few months now! Excited for more people to try this out when it supports config options. A special thanks to the @typescript-eslint.io team who have set the standard for typed lint rules here. Much of this work is based on what has come before and on their rules.

Boshen@boshen.github.io · 9mo ago

Thank you @camchenry.com for the long development of configuring type-aware rules! tsgolint alpha soon! github.com/oxc-project/...

Finally had time to put more effort into implementing oxlint<->tsgolint configuration for rules. Very soon, you'll be able to configure type-aware rules like any other rules. Should be as easy as just upgrading to the latest versions once it is available.

So I started working on it in the evenings when I had time, and last week while I was off work for a week (recovering from eye surgery), in between naps I worked through most of the rule updates. So now almost all of them have documentation for their config options :) github.com/oxc-project/...

linter: various rules are missing `options` documentation on the Rules pages of the website · Issue #14743 · oxc-project/oxc

I think this was covered slightly by #6050, but may have been missed as being within scope of the problem. no-unused-vars, for example, has various options available. But the page for the rule make...

github.com

I had been exploring ESLint alternatives and was bothered by the lack of consistent documentation for rule configs in oxlint. So I opened an issue about it and talked with the maintainers about the right way to solve it, and found out there was a system for auto-generating documentation with types.

linter: various rules are missing `options` documentation on the Rules pages of the website · Issue #14743 · oxc-project/oxc

I think this was covered slightly by #6050, but may have been missed as being within scope of the problem. no-unused-vars, for example, has various options available. But the page for the rule make...

github.com

I am looking for a full-time job. Being independent in open source for 3.5+ years has been wonderful. I've gotten done most of the high-level goals I wanted to, and miss having people & structure around me. If you know of a role for a staff-level TypeScript+web developer, let me know! 🙂

On my laptop, oxlint 1.24 is 3% faster than 1.23 on the `vscode` repository, with even larger improvements for very large codebases. That means if you haven't updated to one of the latest versions in a few weeks, your linting step could be >10% slower than it should be!

A hyperfine benchmark showed that oxlint 1.24 is 1.03 times faster than v1.23, 1.11 times faster than v1.21, and 1.12 times faster than v1.22.
Cam McHenry@camchenry.com · 10mo ago

Oxlint 1.23.0 just got released, which includes the latest in some of the performance optimization work I've been doing. Running on the vscode repository on my M1 laptop, 1.23.0 is ~7-9% faster than previous versions of oxlint with no changes other than just bumping the dependency.

A benchmark of oxlint runs against the vscode repository. The final summary shows 'pnpx oxlint@1.23 --silent' ran 7% faster than 1.21, 8% faster than 1.22, 9% faster than 1.20, and 9% faster than 1.19. The average time for 1.23 was 844.8ms.

Oxlint 1.23.0 just got released, which includes the latest in some of the performance optimization work I've been doing. Running on the vscode repository on my M1 laptop, 1.23.0 is ~7-9% faster than previous versions of oxlint with no changes other than just bumping the dependency.

A benchmark of oxlint runs against the vscode repository. The final summary shows 'pnpx oxlint@1.23 --silent' ran 7% faster than 1.21, 8% faster than 1.22, 9% faster than 1.20, and 9% faster than 1.19. The average time for 1.23 was 844.8ms.

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.