0.1.0 • Published 10 years ago
gobble-eslint v0.1.0
gobble-eslint
Check JavaScript files with eslint and gobble
Installation
First, you need to have gobble installed - see the gobble readme for details. This plugin requires gobble 0.8 or higher. Then,
npm i -D gobble-eslint
Usage
var gobble = require( 'gobble' );
module.exports = gobble( 'src/js' ).observe( 'eslint', {
// skip if this is false (e.g. don't lint during development)
__condition: gobble.env() === 'production',
// if `true`, errors will not cause the whole build to fail
reportOnly: false,
// you can supply your own reporter - it should take an array
// of { filename, messages } objects
reporter: myCustomReporter,
// all other options are eslint options
rules: {
/* eslint rules */
}
});
In this example, whenever files in src/js
change, they will be linted.
If no eslint options are supplied with the second argument, gobble-eslint will use the nearest .eslintrc
file instead (this is recommended). See the eslint website for documentation on the options you can specify.
License
MIT. Copyright 2014 Rich Harris
0.1.0
10 years ago