eslint-rspack-plugin 5.0.0 Ships as a Pure ESM Package, Aligning with the Rstack Ecosystem
Version 5.0.0 of eslint-rspack-plugin has been released as a pure ESM package, aligning with the Rspack ecosystem and removing its CommonJS build. The plugin continues to integrate ESLint in the build process but may affect build times. Users are advised to consider separate linting commands for efficiency. The project is open source and available via npm. By Daniel Curtis
The eslint-rspack-plugin version 5.0.0 has been released, marking a significant shift towards a pure ESM package and better alignment with the Rstack ecosystem. This update mirrors the Rstack 2.0 release, which published core packages as pure ESM and removed their CommonJS builds to streamline module loading and maintain consistency with Node.js practices.
With Node.js 20 and later versions capable of loading ESM modules using require(esm), most projects utilizing the plugin via the JavaScript API should experience minimal practical impact and require no code modifications. The plugin remains functional, continuing to run ESLint during the build process and re-running it in watch mode only on the changed files.
Developers familiar with webpack will find the configuration surface of eslint-rspack-plugin, a fork of eslint-webpack-plugin, quite intuitive. Notable options in the 5.x line include caching, which is enabled by default to improve execution time, a configType switch between the traditional eslintrc format and ESLint's newer flat config, threading for parallel lint tasks, and lintAllFiles to lint every matching file rather than just those in the dependency graph.
However, the project README advises that the plugin might not always enhance build times, recommending the use of a separate lint command instead. This guidance is echoed in other related projects and the Rsbuild FAQ, which emphasizes that Rsbuild does not run ESLint during builds by default to maintain optimal compilation performance.
This trend is part of a broader shift in the ecosystem, with Rstack introducing Rslint, a TypeScript-first, ESLint-compatible linter written in Go, promising 20 to 40 times faster linting than traditional ESLint setups.
For developers upgrading from version 4.x, it is recommended to test the pure ESM change within their toolchain. Furthermore, adopting ESLint's flat config through configType: flat is suggested for improved compatibility. The migration context for the ESM shift can be found in the Rspack 2.0 release notes. The eslint-rspack-plugin is available as open-source software under the MIT license on npm.
Written by urgent.news from InfoQ's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.