Registry / testing / rollup-plugin-eslint

rollup-plugin-eslint

JSON →
library7.0.0jsnpmunverified

A Rollup plugin that verifies entry point and all imported files with ESLint. Version 7.0.0, released 2021-02-12. Maintained by TrySound, this plugin integrates ESLint linting into the Rollup build pipeline. Key differentiators: auto-fix support (via `fix` option) and integration with Rollup's plugin system. Compared to other lint plugins like rollup-plugin-eslint-plugin or @rollup/plugin-eslint (which replaced it), this was the original but is now deprecated in favor of @rollup/plugin-eslint. Last commit was 2019-09-18, so no recent activity.

npm install rollup-plugin-eslint
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-ESLI
R
rollup-plugin-eslint
testingjavascriptv7.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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

eslint
import { eslint } from 'rollup-plugin-eslint'
import eslint from 'rollup-plugin-eslint'
Named export since v5.0.0; default export removed.
rollup-plugin-eslint (CommonJS)
const { eslint } = require('rollup-plugin-eslint')
const eslint = require('rollup-plugin-eslint')
Must destructure to get the named export.
TypeScript types
import { eslint } from 'rollup-plugin-eslint'
Types are not shipped; use @types/rollup-plugin-eslint or upgrade to @rollup/plugin-eslint which includes types.

Basic Rollup configuration using eslint plugin to lint all JS files in src.

// rollup.config.js import { rollup } from 'rollup'; import { eslint } from 'rollup-plugin-eslint'; export default { input: 'src/main.js', plugins: [ eslint({ throwOnError: true, throwOnWarning: false, include: ['src/**/*.js'], exclude: ['node_modules/**'] }) ] };
Debug
Known issues
deprecatedrollup-plugin-eslint is deprecated. Use @rollup/plugin-eslint instead.
fix
Replace with @rollup/plugin-eslint: npm install @rollup/plugin-eslint --save-dev and change import to { eslint } from '@rollup/plugin-eslint'
affects: >=7.0.0
breakingv5.0.0: Changed from default export to named export.
fix
Use import { eslint } from 'rollup-plugin-eslint' instead of import eslint from 'rollup-plugin-eslint'
affects: >=5.0.0
breakingv6.0.0: Dropped Node.js v6 support and upgraded Rollup to v1.
fix
Ensure Node.js >=8 and Rollup >=1.0
affects: >=6.0.0
breakingv7.0.0: Upgraded ESLint to v6, dropped older ESLint versions.
fix
ESLint >=6 required
affects: >=7.0.0
gotchaPlugin processes files only once; if files change after initial build, they are not re-linted unless Rollup runs again.
fix
Use Rollup's watch mode or configure the plugin to run on every build.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: (0 , _rollupPluginEslint.eslint) is not a function
Using default import instead of named import in v5+.
fix
Change to: import { eslint } from 'rollup-plugin-eslint'
Error: Cannot find module 'rollup-plugin-eslint'
Package not installed or incorrect path.
fix
Install: npm install rollup-plugin-eslint --save-dev
The 'eslint' option is not supported. Use 'lint' instead.
Confusion with other lint plugins.
fix
Use the 'eslint' function from rollup-plugin-eslint directly.
Upgrade
Version history
7.0.0latest on npm
Audit
Dependencies
rolluprequiredpeer dependency; plugin requires Rollup >=1.0
eslintrequiredpeer dependency; eslint >=6
Agent activity
9 hits · last 30 days
node
8
Resources
rollup-plugin-eslint — npm install rollup-plugin-eslint · libregistry