Registry / testing / eslint-merge-processors

eslint-merge-processors

JSON →
library2.0.0jsnpmunverified

A utility to combine multiple ESLint processors into a single processor, enabling parallel linting of different file types within one ESLint configuration. Current stable version is 2.0.0, which is ESM-only and requires ESLint flat config. Maintained by Anthony Fu, it differentiates from manual chaining by providing a clean merge function and a pass-through processor for original files. It is commonly used with eslint-plugin-markdown to lint both the markdown file and its embedded code snippets.

npm install eslint-merge-processors
INSTALL
IMPORT
SIG · ESLINT-MERGE-PROCE
E
eslint-merge-processors
testingjavascriptv2.0.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

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

mergeProcessors
✓ import { mergeProcessors } from 'eslint-merge-processors'
✗ const { mergeProcessors } = require('eslint-merge-processors')
Package is ESM-only since v2.0.0; require() will fail with Node.js ESM or bundler. Use dynamic import() in CJS environments.
processorPassThrough
✓ import { processorPassThrough } from 'eslint-merge-processors'
✗ import { passThrough } from 'eslint-merge-processors'
The correct named export is processorPassThrough, not passThrough. It is a separate export from mergeProcessors.
default import
✓ import eslintMergeProcessors from 'eslint-merge-processors'
✗ import mergeProcessors from 'eslint-merge-processors'
The package does not have a default export. Only named exports (mergeProcessors, processorPassThrough) are available.

Shows how to combine a pass-through processor with eslint-plugin-markdown's processor to lint both the .md file and its code snippets.

import { mergeProcessors, processorPassThrough } from 'eslint-merge-processors'; import markdown from 'eslint-plugin-markdown'; export default [ { files: ['**/*.md'], plugins: { markdown }, processor: mergeProcessors([ processorPassThrough, markdown.processors.markdown ]) } ];
Debug
Known issues
breakingv2.0.0 drops CommonJS (CJS) support; the package is now ESM-only. Attempting to require() will throw a ModuleError.
fix
Switch to import syntax or use dynamic import() in CommonJS. Update your ESLint config to use flat config (ESLint >=9).
affects: >=2.0.0
gotchaThe order of processors in the array matters. Processors are applied in sequence; later processors will see the already-modified file from earlier processors.
fix
Ensure processorPassThrough is first if you want to lint the original file alongside other processors.
affects: *
gotchaNot all ESLint processors are compatible with merging. Some processors may assume they have exclusive control over the file and may conflict.
fix
Test the combination thoroughly; consider filing issues upstream for incompatible processors.
affects: *
Errors
Common errors & fixes
Cannot find module 'eslint-merge-processors'
Package not installed or version mismatch in older npm/yarn.
fix
Run 'npm install eslint-merge-processors' in your project root.
require() of ES Module not supported
Using require() to import an ESM-only package in CommonJS.
fix
Use dynamic import: const { mergeProcessors } = await import('eslint-merge-processors'); or convert your project to ESM.
Property 'mergeProcessors' does not exist on type 'typeof import("eslint-merge-processors")'
TypeScript not recognizing the export due to wrong import syntax or missing type declarations.
fix
Ensure you are using named imports: import { mergeProcessors } from 'eslint-merge-processors'. Check tsconfig.json for 'moduleResolution' set to 'node' or 'node16'.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
eslint-merge-processors — npm install eslint-merge-processors · libregistry