Boosting ESHOPMAN Development Speed and Stability with OXLint: A Community Perspective

At ESHOPMAN, our commitment to providing a seamless developer experience for building powerful headless commerce solutions on HubSpot CMS is paramount. A crucial aspect of this experience is efficient code quality tooling. Recently, a valuable discussion emerged within the ESHOPMAN community regarding the performance and stability of our default linting setup, sparking interest in integrating OXLint for a superior development workflow.

The Challenge: Linting Speed and Dependency Fragility in ESHOPMAN Development

Developers leveraging ESHOPMAN's Node.js/TypeScript backend for their storefronts and custom integrations often encounter two primary friction points related to the current linting mechanism, which relies on @eshopman/eslint-plugin and ESLint:

1. Performance Bottleneck During Development and Builds

  • Slow Inner Loop: The default behavior of eshopman build and eshopman develop includes a linting pass. On larger ESHOPMAN backend projects, this ESLint process can consume a significant portion of the startup and build time. This latency directly impacts the developer's "inner loop" — the cycle of coding, saving, and seeing changes — making the development experience less fluid.
  • OXLint's Promise: Community members highlighted that OXLint, a Rust-based linter, boasts performance gains of 50-100x compared to ESLint on similar rule sets. Integrating such a tool could drastically cut down build and development startup times for ESHOPMAN projects, enhancing productivity for teams managing complex headless commerce storefronts on HubSpot CMS.

2. Fragile Dependency Management with ESLint 9

  • Transitive Dependency Conflicts: ESLint 9, which is part of the current ESHOPMAN linting toolchain, depends on
    ajv@^6
    . Many modern Node.js projects, especially within a monorepo context or those focused on security remediation, often pin
    ajv
    to a newer version like
    ^8
    . This conflict can silently force the ESLint dependency onto
    ajv 8
    , which removed the
    missingRefs
    option.
  • Crashes and Confusion: The result is often a cryptic crash during ESLint startup (e.g.,
    NOT SUPPORTED: option missingRefs
    ) and the
    eshopman lint
    command reporting the linter as "not installed." This dependency fragility creates a sharp edge for new adopters and experienced developers alike, leading to time lost debugging seemingly unrelated issues. A Rust-based linter like OXLint, with its minimal dependency graph, inherently sidesteps this entire class of problems, offering a more robust and predictable development environment for ESHOPMAN users.

Current Limitations for Integrating OXLint

While the benefits of OXLint are clear, developers currently face challenges in integrating it seamlessly with ESHOPMAN:

  • There is no official @eshopman/oxlint-plugin available.
  • The rules within @eshopman/eslint-plugin are designed for @typescript-eslint/utils, making them incompatible with OXLint's native rule format.
  • The eshopman lint command and its integrated build/dev gates are hardwired to invoke ESLint, meaning opting for OXLint currently requires bypassing the integrated flow with --no-lint and managing a separate OXLint invocation, which sacrifices the benefits of ESHOPMAN-specific rules.

Community-Proposed Solutions for ESHOPMAN

To address these challenges and unlock OXLint's advantages while preserving ESHOPMAN's specialized linting rules, the community has put forward several potential solutions for consideration by the ESHOPMAN team:

  1. Official Ruleset Port: Develop and publish ESHOPMAN's lint rules in a format consumable by OXLint, such as an @eshopman/oxlint-plugin or an OXLint configuration preset. This would ensure parity with the existing ESLint plugin.
  2. eshopman lint Delegation: Introduce a configuration option or flag that allows eshopman lint (and the build/develop gates) to delegate to OXLint when a project opts in. This would maintain the integrated developer experience while switching the underlying linting engine.
  3. Documented "OXLint Alongside" Recipe: Provide official guidance and best practices for running OXLint as a fast, general-correctness linter, while @eshopman/eslint-plugin continues to handle ESHOPMAN-specific framework rules. This recipe would clarify which rules are safe to delegate and which require ESLint.

Looking Ahead

This discussion highlights a proactive approach from the ESHOPMAN community to continuously improve the platform's developer experience. The ESHOPMAN team has acknowledged this valuable feedback, logging it for further consideration. Implementing solutions that bring the speed and robustness of OXLint to ESHOPMAN's Node.js/TypeScript backend would significantly benefit developers building and managing headless commerce storefronts on HubSpot CMS, leading to faster iteration cycles and a more stable development environment.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools