Skip to content

Commit

Permalink
docs: Update documentation for advanced options (#472)
Browse files Browse the repository at this point in the history
* Update documentation
* nest options under avanced header
* remove space
  • Loading branch information
albanx authored and okonet committed Jul 6, 2018
1 parent c34a3f7 commit d52e074
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions README.md
Expand Up @@ -125,9 +125,29 @@ So, considering you did `git add file1.ext file2.ext`, lint-staged will run the

### Advanced config format

To set options and keep lint-staged extensible, advanced format can be used. This should hold linters object in `linters` property.
To extend and customise lint-staged, avanced options are available. To use this options the format should be as the following:

## Options
#### `package.json` example with `ignore` option:

```json
{
"lint-staged": {
"linters": {
"*.{js,scss}": [
"some command",
"git add"
]
},
"ignore": [
"**/dist/*.min.js"
]
},
}
```

Notice that the linting commands now are nested into the `linters` object. The following options are available for advance configuration:

#### Options

* `concurrent`_true_ — runs linters for each glob pattern simultaneously. If you don’t want this, you can set `concurrent: false`
* `chunkSize` — Max allowed chunk size based on number of files for glob pattern. This option is only applicable on Windows based systems to avoid command length limitations. See [#147](https://github.com/okonet/lint-staged/issues/147)
Expand Down

0 comments on commit d52e074

Please sign in to comment.