Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
docs: update README
  • Loading branch information
iiroj authored and okonet committed Jul 1, 2019
1 parent 2ba6d61 commit 18acd59
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Expand Up @@ -133,7 +133,7 @@ module.exports = {
}
```

### Example: Create your own globs
### Example: Use your own globs

```js
// lintstaged.config.js
Expand All @@ -146,6 +146,19 @@ module.exports = {
}
```

### Example: Use relative paths for commands

```js
const path = require('path')
module.exports = {
'*.ts': absolutePaths => {
const cwd = process.cwd()
const relativePaths = absolutePaths.map(file => path.relative(cwd, file))
return `ng lint myProjectName --files ${relativePaths.join(' ')}`
}
}
```

## What commands are supported?

Supported are any executables installed locally or globally via `npm` as well as any executable from your $PATH.
Expand Down

0 comments on commit 18acd59

Please sign in to comment.