Registry / devops / rollup-plugin-eslint-bundle

rollup-plugin-eslint-bundle

JSON →
library9.0.0jsnpmunverified

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-bundle
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-ESLI
R
rollup-plugin-eslint-bundle
devopsjavascriptv9.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

eslintBundle
import { eslintBundle } from 'rollup-plugin-eslint-bundle'
const eslintBundle = require('rollup-plugin-eslint-bundle')
Package is ESM-only since v9.0.0. Do not use require().
eslintBundle
import { eslintBundle } from 'rollup-plugin-eslint-bundle'
import eslintBundle from 'rollup-plugin-eslint-bundle'
This is a named export, not a default export. Default import will fail.
EslintBundleOptions
import type { EslintBundleOptions } from 'rollup-plugin-eslint-bundle'
import { EslintBundleOptions } from 'rollup-plugin-eslint-bundle'
Type import: use `import type` to avoid including type at runtime.

Demonstrates basic usage: lint and auto-fix the output bundle with ESLint, throwing on warnings and errors.

import { rollup } from 'rollup'; import { eslintBundle } from 'rollup-plugin-eslint-bundle'; const bundle = await rollup.rollup({ input: 'main.js', plugins: [ eslintBundle({ eslintOptions: { fix: true, overrideConfig: { rules: { 'no-console': 'error' } } }, throwOnWarning: true, throwOnError: true, formatter: 'compact' }) ] }); await bundle.write({ file: 'dist/bundle.js', format: 'esm' }); await bundle.close();
Debug
Known issues
breakingVersion 9.0.0 drops support for Node <20 and requires Rollup 4.x.
fix
Upgrade to Node >=20 and Rollup 4.x.
affects: >=9.0.0
breakingVersion 9.0.0 switches to named export (eslintBundle). Previously used default export in v8.
fix
Use import { eslintBundle } from 'rollup-plugin-eslint-bundle'. Remove default import.
affects: >=9.0.0
breakingVersion 9.0.0 removes CommonJS support. Plugin is ESM-only.
fix
Ensure your project uses ESM (e.g., type: 'module' or .mjs extension).
affects: >=9.0.0
deprecatedESLint v8 is the minimum peer dep. ESLint v9 may have breaking changes; check compatibility.
fix
Stay on ESLint 8.x until plugin explicitly supports 9.x.
affects: >=9.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module /path/to/rollup-plugin-eslint-bundle not supported
Using require() on an ESM-only package.
fix
Switch to import { eslintBundle } from 'rollup-plugin-eslint-bundle' and ensure your project is ESM.
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'rollup-plugin-eslint-bundle'
Missing dependency or incorrect import path.
fix
Run npm install rollup-plugin-eslint-bundle and check the import statement.
TypeError: eslintBundle is not a function
Using default import instead of named import.
fix
Use import { eslintBundle } from 'rollup-plugin-eslint-bundle'.
Error: ESLint configuration error: No configuration found
Missing ESLint config file or overrideConfig in eslintOptions.
fix
Provide an ESLint config file (e.g., .eslintrc) or set overrideConfig in eslintOptions.
Upgrade
Version history
9.0.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency: ESLint >=8.x required to perform linting.
rolluprequiredPeer dependency: Rollup 4.x required as the plugin host.
Agent activity
12 hits · last 30 days
node
8
Amazon
2
Resources
rollup-plugin-eslint-bundle — npm install rollup-plugin-eslint-bundle · libregistry