1.1.0 • Published 9 years ago

pretty-javascript v1.1.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 years ago

pretty-javascript

Pretty-JavaScript is Coveo's JavaScript linter used to lint pure JavaScript files with eslint.

Build Status Commitizen friendly GitHub release version npm npm license

Usage

Install pretty-javascript with npm

  npm install --save-dev pretty-javascript

Add pretty-javascript to your gulp pipeline

  var lint = require('pretty-javascript');

  gulp.task('linter', function() {
    gulp
      .src('src/**/*.js')
      .pipe(lint());
  });

Add a global environment variable to your system to allow PrettyJavascript to fail on or after lint errors. By default if there's no variable specified, ESLINT_FAIL_ON_ERROR and ESLINT_FAIL_AFTER_ERROR will fallback to false.

OSX/LINUX:

export ESLINT_FAIL_ON_ERROR=true
  or
export ESLINT_FAIL_ON_ERROR=false (by default)

or

export ESLINT_FAIL_AFTER_ERROR=true
  or
export ESLINT_FAIL_AFTER_ERROR=false (by default)

WINDOWS:

SET ESLINT_FAIL_ON_ERROR=true
  or
SET ESLINT_FAIL_ON_ERROR=false (by default)

or

SET ESLINT_FAIL_AFTER_ERROR=true
  or
SET ESLINT_FAIL_AFTER_ERROR=false (by default)

note: if both variables are set to true, PrettyJavascript will always fail on error.

Extends coveo rules in your .eslintrc file. Example here.

Example

Watch for linter errors/warnings

linter

forthebadge forthebadge forthebadge

1.1.0

9 years ago

1.0.0

10 years ago

0.1.6

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.0.8

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago