gulp plugin for checking JavaScript code with the standard syntax
npm install gulp-standardjsgulp-standardjs instead of gulp-standard)| Package | gulp-standardjs |
| Description | Standard plugin for gulp |
| Node version | >= 0.9 |
| gulp version | 3.x |
#### Install
``sh`
$ npm install --save-dev gulp-standardjs
`javascript
// include the required packages.
var gulp = require('gulp')
var standard = require('gulp-standardjs')
gulp.task('standard', function () {
return gulp.src(['./app.js'])
.pipe(standard())
.pipe(standard.reporter('default', {
breakOnError: true,
quiet: true
}))
})
`
#### Built-in
You can choose a reporter when you call
``javascript``
stuff
.pipe(standard())
.pipe(standard.reporter('default', opts))
External
You can also use some other custom made reporter
``javascript
var reporter = require(
stuff
.pipe(standard())
.pipe(standard.reporter(reporter, opts))
````
OR -javascript``
stuff
.pipe(standard())
.pipe(standard.reporter(
#### Reporter options
##### breakOnError
Type: booleanfalse
Default:
Emit gulp error on reported error
##### breakOnWarning
Type: booleanfalse
Default:
Emit gulp error on reported warning
##### quiet
Type: booleanfalse
Default:
Suppress success messages, only show errors
##### showRuleNames
Type: booleanfalse
Default:
Show rule names for errors/warnings (to ignore specific rules)
##### showFilePath
Type: booleanfalse`
Default:
Show the full file path with the line and column numbers (useful for IDEs that will link to that location)