Rollup plugin that runs ESLint validation on the final bundled output rather than individual source files, allowing you to check and auto-fix the generated bundle. Current stable version is 9.0.0, targeting Node >=20, Rollup 4.x, and ESLint >=8.x. The plugin works as a build-time step, useful for enforcing lint rules on the bundle itself (e.g., code style, prohibited patterns). Differentiators: operates on the bundle, not sources; supports ESLint's fix mode; includes both Rollup config and JavaScript API usage. This plugin is actively maintained.
npm install rollup-plugin-eslint-bundleVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: lint and auto-fix the output bundle with ESLint, throwing on warnings and errors.
Upgrade to Node >=20 and Rollup 4.x.
Use import { eslintBundle } from 'rollup-plugin-eslint-bundle'. Remove default import.Ensure your project uses ESM (e.g., type: 'module' or .mjs extension).
Stay on ESLint 8.x until plugin explicitly supports 9.x.
Switch to import { eslintBundle } from 'rollup-plugin-eslint-bundle' and ensure your project is ESM.Run npm install rollup-plugin-eslint-bundle and check the import statement.
Use import { eslintBundle } from 'rollup-plugin-eslint-bundle'.Provide an ESLint config file (e.g., .eslintrc) or set overrideConfig in eslintOptions.