Skip to content

Commit

Permalink
remove __condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Apr 9, 2015
1 parent 6814206 commit 6883855
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ npm i -D gobble-eslint
```js
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,

Expand All @@ -36,6 +33,13 @@ 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](http://eslint.org/) website for documentation on the options you can specify.

To skip linting when a particular condition is not met, use `.observeIf()`:

```js
module.exports = gobble( 'src/js' )
.observeIf( gobble.env() !== 'production', 'eslint', {...});
```

## License

MIT. Copyright 2014 Rich Harris

0 comments on commit 6883855

Please sign in to comment.