Skip to content

Commit 1855a85

Browse files
committed
More instructions for use are added
1 parent c42970c commit 1855a85

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,29 @@ $ pug-lint [options] <file ...>
2828
* `-c, --config <path>`: [configuration file](#configuration-file) path
2929
* `-r, --reporter <reporter>`: error reporter; console - default, inline
3030

31+
#### Lint multiples files in npm script
32+
33+
```json
34+
{
35+
"scripts": {
36+
"lint:pug": "git ls-files 'src/**/*.pug' | xargs pug-lint",
37+
}
38+
}
39+
```
40+
41+
#### Integrate with [lint-staged](https://www.npmjs.com/package/lint-staged)
42+
43+
```json
44+
{
45+
"lint-staged": {
46+
"{src}/**/*.pug": [
47+
"pug-lint",
48+
"git add"
49+
]
50+
}
51+
}
52+
```
53+
3154
## Editor integration
3255

3356
### Sublime Text 3

0 commit comments

Comments
 (0)