Rsbuild plugin that runs publint to lint npm packages after the build process. It helps library authors catch compatibility issues early by validating package exports, detecting incorrect module formats, and ensuring proper CJS/ESM interop. Version 0.3.4 is the current stable release; maintained actively with frequent updates. Key differentiators: seamless integration with Rsbuild/Rslib, configurable severity thresholds via throwOn option, and ability to run conditionally with enable option. Unlike manual publint invocation, this runs automatically on each build, preventing publishing broken packages.
npm install rsbuild-plugin-publintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage with CI-only enable and strict error handling.
Use pluginPublint() with parentheses.
Do not rely on throw behavior in watch mode; check console output.
Use throwOn instead of setting level in publintOptions.
Upgrade to >=0.3.1 which restored per-build behavior for non-watch.
Change import to: import { pluginPublint } from 'rsbuild-plugin-publint'Run: npm install rsbuild-plugin-publint -D
Call pluginPublint() with or without options object, e.g., pluginPublint() or pluginPublint({})Check publint output for details; you can set throwOn to 'never' to avoid build failure.