# eslint-merge-processors

> Merge multiple ESLint processors to behave like one

Latest version **2.0.0** (published 2025-02-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-merge-processors
pnpm add eslint-merge-processors
yarn add eslint-merge-processors
bun add eslint-merge-processors
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2025-02-08 |
| First published | 2023-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Anthony Fu |
| Maintainers | antfu |
| Keywords | eslint, eslint-processor |

## Links

- npm: https://www.npmjs.com/package/eslint-merge-processors
- Repository: https://github.com/antfu/eslint-merge-processors
- Homepage: https://github.com/antfu/eslint-merge-processors#readme
- Issues: https://github.com/antfu/eslint-merge-processors/issues
- Funding: https://github.com/sponsors/antfu
- npm.io page: https://npm.io/package/eslint-merge-processors

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2025-02-08
- 1.0.0 — 2025-01-09
- 0.1.0 — 2023-12-07
- 0.0.0 — 2023-12-07

## README

# eslint-merge-processors

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![bundle][bundle-src]][bundle-href]
[![JSDocs][jsdocs-src]][jsdocs-href]
[![License][license-src]][license-href]

Merge multiple ESLint processors to behave like one

## Install

```bash
npm i eslint-merge-processors
```

```js
import { mergeProcessors } from 'eslint-merge-processors'

const processor = mergeProcessors([
  processorA,
  processorB,
  // ...
])
```

## Examples

### Markdown

Lint `.md` files with `eslint-plugin-markdown`.

By default, `eslint-plugin-markdown`'s processor will create a virtual file for each code snippet in the markdown file, **but not the original `.md` file itself**. This means the original `.md` file will not be linted.

With this package, along with the `processorPassThrough` processor, you can now fix that:

```ts
import {
  mergeProcessors,
  processorPassThrough
} from 'eslint-merge-processors'
import markdown from 'eslint-plugin-markdown'

// ESlint Flat config
export default [
  {
    files: ['**/*.md'],
    plugins: {
      markdown
    },
    processor: mergeProcessors([
      // This allow the original `.md` file to be linted
      processorPassThrough,
      // The markdown processor
      markdown.processors.markdown,
      // other processors if needed
    ])
  }
]
```

## Sponsors

<p align="center">
  <a href="https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg">
    <img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>
  </a>
</p>

## License

[MIT](./LICENSE) License © 2023-PRESENT [Anthony Fu](https://github.com/antfu)

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/eslint-merge-processors?style=flat&colorA=080f12&colorB=1fa669
[npm-version-href]: https://npmjs.com/package/eslint-merge-processors
[npm-downloads-src]: https://img.shields.io/npm/dm/eslint-merge-processors?style=flat&colorA=080f12&colorB=1fa669
[npm-downloads-href]: https://npmjs.com/package/eslint-merge-processors
[bundle-src]: https://img.shields.io/bundlephobia/minzip/eslint-merge-processors?style=flat&colorA=080f12&colorB=1fa669&label=minzip
[bundle-href]: https://bundlephobia.com/result?p=eslint-merge-processors
[license-src]: https://img.shields.io/github/license/antfu/eslint-merge-processors.svg?style=flat&colorA=080f12&colorB=1fa669
[license-href]: https://github.com/antfu/eslint-merge-processors/blob/main/LICENSE
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
[jsdocs-href]: https://www.jsdocs.io/package/eslint-merge-processors

---
_Source: https://npm.io/package/eslint-merge-processors · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
