npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

gulp-xo

0.21.0 • Public • Published

gulp-xo Build Status

Validate files with XO

Issues regarding rules should be reported on the ESLint issue tracker as it's the actual linter.

Install

$ npm install --save-dev gulp-xo

Usage

const gulp = require('gulp');
const xo = require('gulp-xo');
 
gulp.task('default', () =>
    gulp.src('src/app.js')
        .pipe(xo())
        .pipe(xo.format())
        .pipe(xo.failAfterError())
);

API

xo([options])

options

options.fix

Type: boolean

This option instructs ESLint to try to fix as many issues as possible. The fixes are applied to the gulp stream. The fixed content can be saved to file using gulp.dest (See example/fix.js). Rules that are fixable can be found in ESLint's rules list.

When fixes are applied, a "fixed" property is set to true on the fixed file's ESLint result.

quiet

Type: boolean
Default: false

Report errors only.

xo.format(formatter, output)

xo.failAfterError()

xo.failOnError()

xo.formatEach(formatter, output)

xo.result(action)

xo.results(action)

Related

  • gulp-eslint - Gulp plugin for ESLint
  • gulp-reporter - Error reporter for CSSLint, EditorConfig, ESLint, HTMLHint, PostCSS, TSLint, XO

License

MIT © Sindre Sorhus

install

npm i gulp-xo

Downloadsweekly downloads

261

version

0.21.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
Report a vulnerability