Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslinter

royriojas592MIT3.2.1

Simple wrapper around eslint with support for globs and cache, so files that not changed can be skipped, if previous run passed

lint, eslint, javascript, code, check, jshint alternative, glob, file glob, jsx lint, jsx eslint, code validation, validate code

readme

NPM Version Build Status

eslinter

Simple wrapper around eslint with support for globs and cache, so files that not changed can be skipped, if previous run passed

Motivation

Eslint is a nice tool but I wanted to be able to pass globs to validate and use a cache to speed up the validation process.

Features

  • This module add the ability to remember which files were processed. So the next execution will only consider those files that changed. In order to destroy the cache, just execute the command with the option --no-use-cache or --use-cache=false and the cache will be destroyed.
  • This module also accepts globs from the command line. Check the examples below

Install

npm i -g eslinter

Usage

Usage: eslinter [options] glob [glob1] [glob2]..[globN]

Options:
  -i, --cache-id String
      An identifier for the cache file to create. This is only needed if you want to run this task in
      parallel otherwise the next execution might get confusing results for reusing the same cache
      file.
  -f, --format String    the formatter to use to format the output of the tool. If none specified
                         this will use `eslint-friendly-formatter` - default:
                         eslint-friendly-formatter
  -u, --use-cache
      If true, this module will remember the `mtime` and `size` of the linted files that passed
      validation and only operate on the ones that changed. If false, the cache will be destroyed.
      Cache will only be kept between executions with the useCache flag set to true. - default: true
  -h, --help             Show this help
  -v, --version          Outputs the version number
  -q, --quiet            Show only the summary info - default: false
  --colored-output       Use colored output in logs
  -c, --config String
      Path to your `eslint` config, if not provided will try to use the `.eslintrc` file in your
      current working directory, if not found will use the one provided with this package. Check:
      http://eslint.org/docs/user-guide/configuring for more info about the configuration options.

Examples

# validate files, easy way
eslinter src/**/*.js specs/**/*.js

# skip the cache. The next execution without the flag will create a new cache
eslinter --no-use-cache src/**/*.js

# especify a custom formatter
eslinter -f 'stylish' src/**/*.js

# especify a custom formatter from node_modules
eslinter -f 'node_modules/eslint-path-formatter' src/**/*.js

Note

The cache is only kept if the executions of the eslinter command are done without the --no-use-cache or --use-cache=false flags. If any execution include this flag the cache will be destroyed and be created again from scratch the next execution without that flag.

Changelog

changelog

eslinter - Changelog

v3.2.1

  • Build Scripts Changes

v3.2.0

  • Enhancements
    • use babel-eslint to parse all ES6 syntax - 7b147c0, royriojas, 01/10/2015 11:09:49

v3.1.0

  • Enhancements
    • update eslinter to get latest eslint-plugin-react - 95f1350, royriojas, 26/09/2015 01:39:17

v3.0.2

  • Features

v3.0.1

  • Enhancements

v3.0.0

  • Enhancements

v2.3.3

  • Bug Fixes
    • properly expand globs that contains globs with exclude patterns - 23cdd38, royriojas, 16/08/2015 23:20:37

v2.3.2

  • Build Scripts Changes
    • update clix dep to get nicer log output - 85f2a4c, royriojas, 11/08/2015 19:40:47

v2.3.1

  • Build Scripts Changes

v2.3.0

  • Build Scripts Changes
    • update clix dep to get nicer log output - 7c8ddbb, royriojas, 09/08/2015 20:25:23

v2.2.0

  • Features
    • Add cacheId option to specify an identifier for the cache file to use - 8651032, royriojas, 05/08/2015 21:47:22

v2.1.0

  • Build Scripts Changes

    • Remove bumpery in favor of npm scripts - 2aad65f, royriojas, 28/07/2015 15:51:30

      added bump-major bump-minor and bump-patch scripts.

      Run then like

      npm run bump-patch
    • Update deps - 56eef83, royriojas, 28/07/2015 15:50:25

  • Enhancements

v2.0.6

  • Enhancements
    • Add token to ignore global mockquire function injected by browsyquire - 5980ea1, royriojas, 21/07/2015 21:41:25

v2.0.5

  • Enhancements

    • Cache is now enabled by default. - 1db5cef, royriojas, 12/07/2015 23:27:01

      To disable it. Pass the flag --no-use-cache or --use-cache=false

      This will destroy the cache. A new one will be created the next execution without those flags

v2.0.4

  • Refactoring
    • Normalize info about this module options - e929182, royriojas, 12/07/2015 22:35:26

v2.0.3

  • Build Scripts Changes
    • Automate generation of changelog and commit message for it - 8041291, royriojas, 12/07/2015 21:43:14

v2.0.2

  • Build Scripts Changes

    • Update module deps to remove colored output - 9e202e0, royriojas, 12/07/2015 21:37:54

      If colored output is required export the following variable

      export __CLIX_COLORED_OUTPUT__=true

v2.0.0

  • Features
    • Add eslint-plugin-react and enable es6 flags - 4a353cb, royriojas, 16/06/2015 04:07:52
  • Build Scripts Changes

v1.0.3

  • Bug Fixes
    • Warnings are only being shown when there are also errors. Fix #1 - f837773, royriojas, 07/06/2015 03:18:21

v1.0.2

  • Build Scripts Changes

v1.0.1

  • Build Scripts Changes

v1.0.0

main-module