@chooban/eslint-parallel

2.0.2 • Public • Published

eslint-parallel

Tiny eslint wrapper to allow executing javascript linting in parallel.

This is a fork of the original project, in order to update the version of eslint being used. As there are a number of PRs that have been waiting to be merged for a while in the original, I decided to publish this as I need it.

Install

npm install eslint-parallel

Access CLI

node_modules/.bin/eslint-parallel src/js/**

Options

See ESLint Docs for all the options

CPU Count

If you need to override the CPU count (e.g. on CI), you can use the environment variable ESLINT_CPU_COUNT.

API Usage

  import Linter from 'eslint-parallel';
  new Linter({
    cache: true,
    cwd: process.cwd()
  }).execute(['src/js/**']).then(
    (result) => {
      const failed = result.errorCount || result.warningCount;

      if (failed) {
        // failed
      } else {
        // passed
      }
    },
    (err) => {
      console.log(err);
      process.exit(1);
    }
  );

Readme

Keywords

none

Package Sidebar

Install

npm i @chooban/eslint-parallel

Homepage

eslint.org/

Weekly Downloads

50

Version

2.0.2

License

Apache-2.0

Unpacked Size

21.6 kB

Total Files

11

Last publish

Collaborators

  • chooban