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

esprint

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esprint

Parallelized eslint

  • 0.4.0-beta.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
increased by5.44%
Maintainers
2
Weekly downloads
 
Created
Source

esprint Build Status npm version

esprint (pronounced E-S-sprint) speeds up eslint by running the linting engine across multiple threads, and optionally sets up a server daemon to cache the lint status of each file in memory. It uses a watcher to determine when files change, as to only re-lint what is necessary.

Usage

In order to use esprint, first place an .esprintrc file in your project. This is similar to a .flowconfig. The .esprintrc file describes which paths to lint, which paths to ignore, as well as (optionally) what port to start a lint server on. A sample .esprintrc file is shown as follows:

{
  "port": 5004 ,
  "paths": [
      "foo/*.js",
      "bar/**/*.js",
    ],

  "ignored": [
      "**/node_modules/**/*"
    ]
}

To run the esprint server, run the following command:

$ esprint

If the port key is not specified in the .esprintrc file, then esprint will run parallelized eslint without standing up a background server.

By default, esprint will split up linting duties across all CPUs in your machine. You can manually override this via the cli with the command:

$ esprint --workers=[num_workers]

If the server is running in the background, you can use the following command to stop the background server:

$ esprint kill

You can run esprint from any subdirectory that .esprintrc is located in, and it will still properly lint all files as specified.

Developing for esprint

In order to use esprint in your project, clone the repository and install all of the dependencies.

$ git clone https://github.com/pinterest/esprint.git && cd esprint
$ yarn

In the esprint repo, run yarn link, and in your project that uses ESprint, run yarn link esprint. (Note: yarn link is only supported by yarn version 0.26 and later.)

After that, run yarn run deps /path/to/project/ so that esprint installs all eslint-related dependencies.

In a separate tab, you can also run npm start. This starts up babel-watcher, which will compile your JavaScript.

Then, run esprint directly from your node_modules folder like so:

$ node ./node_modules/esprint/build/cli.js [opts]

FAQs

Package last updated on 29 Jun 2017

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