Urgent.News

What's breaking now, across thousands of outlets.

Tech

Oxlint JS Plugins: Your Custom ESLint Rules No Longer Keep You on ESLint

Every team that has looked at Oxlint has hit the same wall. The benchmarks are great, the built-in rules cover most of what you use, and then someone remembers the twelve custom rules in eslint-local-rules/ , plus eslint-plugin-testing-library , plus that one SonarJS rule the security folks insisted on. None of that exists in Rust, so the migration dies in the planning doc and CI keeps spending…

Oxlint, a JavaScript plugin for ESLint, has improved the custom rule experience for developers. With the latest alpha release in March 2026, roughly 80% of ESLint users can seamlessly switch to Oxlint without any issues. The key advantage is its compatibility with ESLint's plugin API while running Rust rules alongside native JavaScript rules. This hybrid approach allows users to keep their existing rules and only pay the JavaScript price for rules that require it.

To implement this, configure the jsPlugins array in your config file with valid import specifiers, pointing to either npm packages or local files. For example, you can enable eslint-plugin-testing-library and a local lint/rules.js file. Oxlint runs its JS plugin layer against ESLint's rule test suite (33,006 tests, 100% passing) and popular plugins like eslint-plugin-react-hooks, ESLint Stylistic, Testing Library, and SonarJS, achieving at or near 100% compatibility.

Name collisions are handled through aliasing, allowing you to use native rules when available and fall back to npm packages for the rest. For example, Oxlint implements some plugins natively (like jsdoc and react) but not all rules within them. The oxlint-plugin-eslint package offers all ESLint's built-in rules as a JS plugin under the eslint-js prefix, enabling seamless migration.

Writing rules in Oxlint is similar to ESLint, with the same create(context) API. An alternative createOnce API is available for new rules, offering better performance by running once per file instead of per AST node. This allows Oxlint to learn visitors upfront and skip files that contain none of the relevant nodes, reducing the Rust/JS boundary crossing.

The migration process is simple, requiring a single command against your flat config: npx @oxlint/migrate eslint.config.js. In practice, Oxlint significantly outperforms ESLint, with the Node.js repo example taking just 21 seconds compared to ESLint's 1 minute 43 seconds. However, projects relying heavily on TypeScript-eslint may see even greater performance gains due to type-aware linting.

Three crucial factors to consider before fully migrating away from ESLint are Vue, Svelte, and Angular templates, custom file formats and parsers, and custom type-aware rules. If your rules need to handle templates or type-checking, keep ESLint for those files for now. Additionally, slow plugins remain slow in Oxlint, as it provides a fast parser but cannot optimize plugins that hit the filesystem excessively.

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

Writing an MCP Server: The Tool Description Is the Whole API

Most first MCP servers look the same: someone wraps their existing REST API, exposes one tool per endpoint, ships it, and then watches the model call the wrong tool with the wrong arguments. The protocol worked fine. The design didn't. That's the part the tutorials skip.

  • The tool description defines the entire API in MCP protocol.
  • SDK handles transport, discovery, and validation of tools.
  • Minimal server includes @modelcontextprotocol/server and @modelcontextprotocol/client packages.

More from Sunday 8 November →