Registry / devops / eslint-webpack-migrate

eslint-webpack-migrate

JSON →
library0.1.0jsnpmunverified

Migration helpers for replacing the deprecated eslint-loader with eslint-webpack-plugin in webpack configurations. Current version 0.1.0, released with Node >=18 support. Scans plain webpack config objects, removes eslint-loader references, extracts plugin options, and returns install guidance. Zero runtime dependencies, ships TypeScript types. Not affiliated with the original maintainers. Suitable for projects transitioning away from the deprecated eslint-loader pattern, offering a structured migration path without requiring webpack or the plugin at runtime.

npm install eslint-webpack-migrate
INSTALL
IMPORT
SIG · ESLINT-WEBPACK-MIG
E
eslint-webpack-migrate
devopsjavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

migrateEslintLoaderConfig
import { migrateEslintLoaderConfig } from 'eslint-webpack-migrate'
const { migrateEslintLoaderConfig } = require('eslint-webpack-migrate')
ESM-only since v0.1.0; no CommonJS support.
hasEslintLoader
import { hasEslintLoader } from 'eslint-webpack-migrate'
Named export, no default export.
recommendedInstall
import { recommendedInstall } from 'eslint-webpack-migrate'
Returns a string with install command; no TypeScript type export.
type MigrationResult
import type { MigrationResult } from 'eslint-webpack-migrate'
import { MigrationResult } from 'eslint-webpack-migrate'
TypeScript users should use type import to avoid runtime errors; the symbol is only a type.

Migrates an eslint-loader config to eslint-webpack-plugin, showing removed loader and generated plugin options.

import { migrateEslintLoaderConfig } from 'eslint-webpack-migrate'; const webpackConfig = { module: { rules: [ { test: /\.ts$/, use: [ 'eslint-loader', { loader: 'eslint-loader', options: { fix: true } } ] } ] } }; const result = migrateEslintLoaderConfig(webpackConfig); console.log('Migrated config:', JSON.stringify(result.config, null, 2)); console.log('Plugin options:', JSON.stringify(result.pluginOptions, null, 2)); console.log('Install command:', result.install);
Debug
Known issues
breakingOnly ESM imports supported; require() will throw an error.
fix
Use import syntax or switch to an ES module project.
affects: >=0.1.0
breakingNode.js version must be >=18.
fix
Upgrade Node.js to version 18 or higher.
affects: >=0.1.0
deprecatedeslint-loader is deprecated; this package only helps migrate away from it.
fix
Replace eslint-loader with eslint-webpack-plugin as guided.
affects: >=0.1.0
gotchaPackage not affiliated with original eslint-loader or eslint-webpack-plugin maintainers; no official support.
fix
Verify migration output and report issues to the package repository.
affects: >=0.1.0
gotchamigrateEslintLoaderConfig only handles loader references in rules; does not touch config plugins or other areas.
fix
Manually inspect config after migration for any additional references.
affects: >=0.1.0
gotchaFunction returns a new config object; original is not mutated but references within may be shared.
fix
Treat returned config as a deep copy; do not rely on immutability of nested objects.
affects: >=0.1.0
Errors
Common errors & fixes
TypeError: migrateEslintLoaderConfig is not a function
Using require() instead of import; package is ESM-only.
fix
Change to import { migrateEslintLoaderConfig } from 'eslint-webpack-migrate' and ensure project uses ES modules.
ERR_REQUIRE_ESM: require() of ES Module not supported
Attempting to require() an ESM-only package.
fix
Switch to import syntax or set type: 'module' in package.json.
Uncaught SyntaxError: Unexpected token 'export'
Bundler not configured for ESM or Node version <18.
fix
Upgrade Node to >=18, or configure bundler to handle ESM.
TypeScript: Module '"eslint-webpack-migrate"' has no exported member 'migrateEslintLoaderConfig'
Importing a type as a value (e.g., MigrationResult).
fix
Use 'import type' for types: import type { MigrationResult } from 'eslint-webpack-migrate'.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies
eslint-webpack-pluginoptionaltarget plugin for migration output
webpackoptionalconfig object traversal may reference webpack internals
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-webpack-migrate — npm install eslint-webpack-migrate · libregistry