From 7b4e1f020bae4acbadcdbf816d02d1f99cd0a99e Mon Sep 17 00:00:00 2001 From: Guilherme Rv Coelho Date: Fri, 4 May 2018 07:47:11 -0300 Subject: [PATCH] docs: update usage instructions --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 04ec514..f15b5e0 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ filter only the errors introduced in the commit range (and nothing more). 1. Install it: ```sh - npm install lint-diff + $ npm install lint-diff ``` 2. Install `eslint` and add your eslint configuration file. @@ -34,7 +34,7 @@ filter only the errors introduced in the commit range (and nothing more). ```sh # This will lint the last commit - lint-diff HEAD^..HEAD + $ lint-diff HEAD^..HEAD ``` ## Examples @@ -42,18 +42,20 @@ filter only the errors introduced in the commit range (and nothing more). 1. Lint the last 3 commits: ```sh - lint-diff HEAD~3..HEAD + $ lint-diff HEAD~3..HEAD ``` 2. Lint local changes that are not yet commited (similar to what [lint-staged](https://github.com/okonet/lint-staged) do): ```sh - lint-diff HEAD + $ lint-diff HEAD + # or + $ lint-diff ``` 3. Lint all commits from a build in [Travis](https://travis-ci.org): ```sh # This environment variable will be available in any Travis build - lint-diff $TRAVIS_COMMIT_RANGE + $ lint-diff $TRAVIS_COMMIT_RANGE ```