Skip to content
InfoQ·

🛠️eslint-rspack-plugin V5 Drops CommonJS Support

Your build tool just went all-in on ESM

TL;DR

The eslint-rspack-plugin version 5.0.0 is now a pure ESM package, dropping its CommonJS build. Most projects will see little impact but should test the change against their toolchain.

eslint-rspack-plugin v5.0.0 has dropped support for CommonJS in favor of pure ESM modules. This mirrors Rspack's move to ESM-only packages, aligning with Node.js 20+ compatibility. Most projects won't need code changes but should test the shift against their current setup. The plugin continues to run ESLint during builds and offers options like caching and multi-threaded lint tasks. For teams focused on build speed, a standalone linter might be more efficient.

eslint-rspack-plugin V5 Drops CommonJS Support — InfoQ

Key Points

1

eslint-rspack-plugin version 5.0.0 is now published as a pure ESM package

2

CommonJS build support has been removed, aligning with Rspack's 2.0 release

3

Node.js 20 and later can load ESM modules using require(esm)

4

Most projects consuming the plugin through JavaScript API see little practical impact

5

Rslint, a TypeScript-first linter from Rstack, delivers up to 40x faster linting than traditional ESLint setups

Why It Matters

If you're upgrading from eslint-rspack-plugin v4.x and use Node.js 20+, the pure ESM change should be smooth. However, test against your current toolchain and adopt flat configType where practical for optimal performance.

eslintrspackesmcommonjstypescript

Frequently Asked Questions

Why does this matter?

If you're upgrading from eslint-rspack-plugin v4.x and use Node.js 20+, the pure ESM change should be smooth. However, test against your current toolchain and adopt flat configType where practical for optimal performance.

What happened?

The eslint-rspack-plugin version 5.0.0 is now a pure ESM package, dropping its CommonJS build. Most projects will see little impact but should test the change against their toolchain.

Comments

Subscribe to join the conversation...

Be the first to comment

Enjoyed this article?

Get it daily. 7am. Free. Reads in 5 minutes.