Registry / web-framework / eslint-webpack-plugin

eslint-webpack-plugin

JSON →
library6.0.0jsnpmunverified

A webpack plugin that integrates ESLint into the webpack build process, linting JavaScript files during compilation. Current stable version is 6.0.0, released April 2026. Requires webpack 5 and ESLint 9+. Key changes: v5 switched to flat config by default, v6 dropped threads option, removed ESLint 8 and Node.js 18 support. Official plugin from webpack organization, ships TypeScript types, supports caching and auto-fix. Distinguished by seamless webpack integration vs standalone ESLint usage.

npm install eslint-webpack-plugin
INSTALL
IMPORT
SIG · ESLINT-WEBPACK-PLU
E
eslint-webpack-plugin
web-frameworkjavascriptv6.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.

ESLintPlugin
import ESLintPlugin from 'eslint-webpack-plugin'
const ESLintPlugin = require('eslint-webpack-plugin')
Package is ESM-only since v3. For CommonJS use createRequire or dynamic import.
ESLintPlugin (type)
import type { ESLintPlugin } from 'eslint-webpack-plugin'
TypeScript users can import the type for type-checking options.
Options
import type { Options } from 'eslint-webpack-plugin'
The Options type is exported for TypeScript plugin configuration.

Shows how to add ESLint webpack plugin with cache and auto-fix enabled, targeting TypeScript and JavaScript files.

import ESLintPlugin from 'eslint-webpack-plugin'; export default { plugins: [new ESLintPlugin({ files: 'src/**/*.{js,ts}', fix: true, cache: true, cacheLocation: 'node_modules/.cache/eslint-webpack-plugin/.eslintcache' })] };
Debug
Known issues
breakingv5 defaults to flat config ('configType': 'flat'). eslintrc configs no longer work by default.
fix
Set configType: 'eslintrc' in plugin options, or migrate to flat config format (eslint.config.js).
affects: >=5.0.0
breakingv5 requires Node.js >=18.12.0 and ESLint >=9. Previous versions with ESLint 8 are incompatible.
fix
Upgrade Node.js to 18.12+ and ESLint to 9+. For ESLint 8 stay on v4.
affects: >=5.0.0
breakingv6 removed the 'threads' option entirely.
fix
Remove 'threads' from plugin options. Threading is no longer supported.
affects: >=6.0.0
gotchaThe 'fix' option modifies source files in place. Use with caution in version control.
fix
Set fix: false (default) or ensure you have backups / git stash before enabling.
affects: >=2.0.0
gotchaIf using eslintrc configuration, you must set configType: 'eslintrc' otherwise plugin ignores eslintrc files.
fix
Explicitly pass configType: 'eslintrc' in plugin options.
affects: >=5.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-webpack-plugin'
Package not installed or not in node_modules.
fix
Run 'npm install eslint-webpack-plugin --save-dev' or 'yarn add -D eslint-webpack-plugin'.
Error: [eslint-webpack-plugin] Failed to load ESLint: ESLint version must be >=9
Installed ESLint version is too old (e.g., v8).
fix
Upgrade ESLint to v9+ with 'npm install eslint@latest --save-dev'.
Error: [eslint-webpack-plugin] The 'threads' option has been removed in v6
Used 'threads' option which was removed in v6.
fix
Remove 'threads' from plugin options.
Error: No ESLint configuration found
No .eslintrc or eslint.config.js file found, or configType mismatch.
fix
Create an eslint.config.js (flat) or .eslintrc.* (eslintrc) file and set configType appropriately.
Upgrade
Version history
6.0.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency - ESLint is the linter engine
webpackrequiredPeer dependency - runs as a webpack plugin
Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
eslint-webpack-plugin — npm install eslint-webpack-plugin · libregistry