eslint-rspack-plugin 5.0.0 Transitions to Pure ESM for Rstack Alignment

This move removes CommonJS builds to align with the Rstack ecosystem and Rspack 2.0, ensuring more consistent module loading in accordance with modern Node.js practices.

The shift to pure ESM isn’t just a technical housekeeping chore; it’s a signal of where the Rstack ecosystem is heading. By dropping CommonJS builds, the eslint-rspack-plugin 5.0.0 update mirrors the architecture of Rspack 2.0. For most developers, the transition should be seamless. Since Node.js 20 and later versions can load ESM modules via require(esm), projects using the JavaScript API likely won’t need to change a single line of code.

Compilation Performance and the Rslint Alternative

Running a linter during a build is a double-edged sword. While it catches errors immediately, it slows down the developer loop. The project README is explicit about this trade-off, warning that you may find it more efficient to avoid using the eslint-rspack-plugin, as running ESLint during the build can lead to longer build times.

This performance anxiety extends to other parts of the stack. According to the Rsbuild FAQ, the tool does not run ESLint during builds by default to protect compilation performance. The same caution is echoed in @rsbuild/plugin-eslint.

The Rstack team is addressing this bottleneck with a different approach: Rslint. This TypeScript-first, ESLint-compatible linter is written in Go and powered by typescript-go. The claim is significant—Rslint reportedly delivers 20 to 40 times faster linting than traditional ESLint setups. For teams where every millisecond of build time counts, the move is away from bundler-integrated linting and toward standalone, high-performance tools.

Configuration Options in the 5.x Line

Because the plugin was originally forked from eslint-webpack-plugin, the configuration will feel familiar to those coming from the webpack ecosystem. Version 5.0.0 maintains several critical options to balance thoroughness with speed.

  • Caching: Enabled by default to minimize execution time.
  • configType: Allows a switch between the classic eslintrc format and the newer ESLint flat config.
  • Threads: Enables lint tasks to run across a thread pool.
  • lintAllFiles: Lints every matching file regardless of whether it is in the dependency graph, a feature specifically designed for multi-environment Rsbuild and Rspack builds.

Developers moving from the 4.x line are encouraged to test the pure ESM change against their toolchain and, where possible, adopt the flat config by setting configType: ‘flat’.

The Rise of Hyper-Pedantic Linting with Nitpicker

While the Rstack ecosystem focuses on speed, other corners of the ESLint world are leaning into extreme precision. A new package, @alien_intelligence/eslint-plugin-nitpicker, has emerged to flag stylistic and semantic “nits” that traditional linters typically ignore.

Nitpicker is designed for a hybrid future where humans and AI agents co-author code. To facilitate this, every finding includes a problem, a reason, and a concrete fix. This structure allows an AI agent or eslint --fix to resolve the issue on the first attempt without needing external documentation.

Rule Fixable Description
nitpicker/no-british-english Yes Disallows British spellings in identifiers and comments.
nitpicker/no-line-comment-period Yes Disallows prose periods in // line comments.
nitpicker/no-single-line-jsdoc Yes Requires JSDoc comments to span multiple lines.
nitpicker/max-jsdoc-description-length No Enforces a maximum character length for JSDoc (default 250).

The plugin is strictly modern, requiring ESLint 9+ and supporting only the flat config (eslint.config.js). There is no support for legacy .eslintrc files. For TypeScript projects, it requires the installation of @typescript-eslint/parser to function correctly.

Integrating Nitpicker into TypeScript Workflows

Implementing Nitpicker requires a specific configuration to prevent the rules from affecting every file in a project. For TypeScript users, the recommended approach involves scoping the rules to the source files while defining the parser and language options.

The plugin ships with five shared flat configs: recommended (the universal base with warnings), base (no framework assumptions), all (maximally pedantic), react, and adonisjs. While all rules ship as warnings by default, developers can promote any specific rule to an error by overriding the rule level.

The divergence in the current linting landscape is clear. On one side, the Rstack ecosystem is stripping away legacy formats and pushing for Go-powered speed. On the other, tools like Nitpicker are adding layers of semantic and stylistic rigor to prepare codebases for AI-driven maintenance. Both paths lead toward the same destination: the total abandonment of legacy CommonJS and .eslintrc configurations in favor of the ESM-driven flat config.

Worth a look


Discover more from Archyworldys

Subscribe to get the latest posts sent to your email.