Urgent.News

What's breaking now, across thousands of outlets.

Tech

ESLint took 4.4s to lint Vue's core. oxlint took 0.24s. Then I turned on the type-aware rules.

ESLint took 4.4 seconds to lint 445 TypeScript files. oxlint took 0.24. Turn on the type-aware rules that most projects actually want and ESLint climbs to 12 seconds, while oxlint, doing the type-aware pass too, finishes in under one. I went in expecting to write that oxlint was fast but limited. The limited part did not survive the test. The setup oxlint is the JavaScript and TypeScript linter…

In a recent test, the author compared the performance of ESLint and oxlint, two JavaScript and TypeScript linters, on the Vue core repository. ESLint took 4.4 seconds to lint 445 TypeScript files, while oxlint completed the task in 0.24 seconds. When the type-aware rules were enabled, ESLint took 12 seconds, and oxlint finished in under one second.

The author initially believed that oxlint's speed came from skipping the type-aware rules, but this proved incorrect. By using the --type-aware flag, oxlint was able to perform the expensive type-aware analysis in just 0.9 seconds, which was thirteen times faster than ESLint's 12-second run. This demonstrates that the speed advantage of oxlint comes from its ability to handle the type-aware rules efficiently, rather than simply performing a cheaper syntactic analysis.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Sunday 13 September →