File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,35 @@ $ pug-lint [options] <file ...>
28
28
* ` -c, --config <path> ` : [ configuration file] ( #configuration-file ) path
29
29
* ` -r, --reporter <reporter> ` : error reporter; console - default, inline
30
30
31
+ #### Lint multiples files in npm script
32
+
33
+ First install [ glob-exec] ( https://www.npmjs.com/package/glob-exec )
34
+
35
+ ``` shell
36
+ npm i -D glob-exec
37
+ ```
38
+
39
+ ``` json
40
+ {
41
+ "scripts" : {
42
+ "lint:pug" : " glob-exec \" ./src/**/*.pug\" -- \" pug-lint {{files.join(' ')}}\" "
43
+ }
44
+ }
45
+ ```
46
+
47
+ #### Integrate with [ lint-staged] ( https://www.npmjs.com/package/lint-staged )
48
+
49
+ ``` json
50
+ {
51
+ "lint-staged" : {
52
+ "{src}/**/*.pug" : [
53
+ " pug-lint" ,
54
+ " git add"
55
+ ]
56
+ }
57
+ }
58
+ ```
59
+
31
60
## Editor integration
32
61
33
62
### Sublime Text 3
You can’t perform that action at this time.
0 commit comments