For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /guide/usage/rule-config.md.
close
  • English
  • Compilation diagnostic rules

    Build diagnostics complement static lint tools such as ESLint. They run against Rspack's build data and can use information such as the ModuleGraph, per-module metadata, and generated runtime code.

    During the build process, if issues are discovered, they will be visible in the CLI and the final diagnostic summary webpage, as shown below:

    How to use

    Currently, Rsdoctor provides built-in rules and custom rules.

    Built-in Rules

    The existing diagnostic tool includes multiple rules, all of which are enabled by default. They are:

    1. [E1001] Duplicate Packages
    2. [E1002] Cross Chunks Package
    3. [E1003] Loader Performance Optimization
    4. [E1004] ECMA Version Check
    5. [E1005] Default Import Check

    For specific details, refer to Built-in Rules.

    Custom rules

    Rsdoctor also collects analyzed data and allows users to integrate custom rules through the Linter API. For details on custom rules, refer to Custom Rules.