File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ filter only the errors introduced in the commit range (and nothing more).
25
25
1 . Install it:
26
26
27
27
``` sh
28
- npm install lint-diff
28
+ $ npm install lint-diff
29
29
```
30
30
31
31
2 . Install ` eslint ` and add your eslint configuration file.
@@ -34,26 +34,28 @@ filter only the errors introduced in the commit range (and nothing more).
34
34
35
35
``` sh
36
36
# This will lint the last commit
37
- lint-diff HEAD^..HEAD
37
+ $ lint-diff HEAD^..HEAD
38
38
```
39
39
40
40
## Examples
41
41
42
42
1 . Lint the last 3 commits:
43
43
44
44
``` sh
45
- lint-diff HEAD~3..HEAD
45
+ $ lint-diff HEAD~3..HEAD
46
46
```
47
47
48
48
2 . Lint local changes that are not yet commited (similar to what [ lint-staged] ( https://github.com/okonet/lint-staged ) do):
49
49
50
50
``` sh
51
- lint-diff HEAD
51
+ $ lint-diff HEAD
52
+ # or
53
+ $ lint-diff
52
54
```
53
55
54
56
3 . Lint all commits from a build in [ Travis] ( https://travis-ci.org ) :
55
57
56
58
``` sh
57
59
# This environment variable will be available in any Travis build
58
- lint-diff $TRAVIS_COMMIT_RANGE
60
+ $ lint-diff $TRAVIS_COMMIT_RANGE
59
61
```
You can’t perform that action at this time.
0 commit comments