Skip to content

Commit 7b4e1f0

Browse files
committed
docs: update usage instructions
1 parent 713a42d commit 7b4e1f0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ filter only the errors introduced in the commit range (and nothing more).
2525
1. Install it:
2626

2727
```sh
28-
npm install lint-diff
28+
$ npm install lint-diff
2929
```
3030

3131
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).
3434

3535
```sh
3636
# This will lint the last commit
37-
lint-diff HEAD^..HEAD
37+
$ lint-diff HEAD^..HEAD
3838
```
3939

4040
## Examples
4141

4242
1. Lint the last 3 commits:
4343

4444
```sh
45-
lint-diff HEAD~3..HEAD
45+
$ lint-diff HEAD~3..HEAD
4646
```
4747

4848
2. Lint local changes that are not yet commited (similar to what [lint-staged](https://github.com/okonet/lint-staged) do):
4949

5050
```sh
51-
lint-diff HEAD
51+
$ lint-diff HEAD
52+
# or
53+
$ lint-diff
5254
```
5355

5456
3. Lint all commits from a build in [Travis](https://travis-ci.org):
5557

5658
```sh
5759
# This environment variable will be available in any Travis build
58-
lint-diff $TRAVIS_COMMIT_RANGE
60+
$ lint-diff $TRAVIS_COMMIT_RANGE
5961
```

0 commit comments

Comments
 (0)