Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-merge-processors

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-merge-processors

Merge multiple ESLint processors to behave like one

  • 0.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
186K
decreased by-2.23%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-merge-processors

npm version npm downloads bundle JSDocs License

Merge multiple ESLint processors to behave like one

Install

npm i eslint-merge-processors
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:

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

License

MIT License © 2023-PRESENT Anthony Fu

Keywords

FAQs

Package last updated on 07 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc