From 4d29567f572102e273587fe1ef68120c6916a2e4 Mon Sep 17 00:00:00 2001 From: pdinh_turner Date: Mon, 6 Nov 2017 10:27:36 -0500 Subject: [PATCH 1/2] updated README --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index 12761b8..07d8ad1 100644 --- a/README.md +++ b/README.md @@ -1 +1,41 @@ # CNN Birdman + +## Getting Started + +### 1. Add `cnn-birdman` to your existing project. + +```bash +$ npm install -D -E bitbucket:vgtf/cnn-birdman +``` + +### 2. Add to your existing npm scripts: + +```diff +"scripts": { ++ "lint": "cnn-birdman run [style|javascript]" // optionally pass in specific check +} +``` +### 3. Add a `.eslintrc` into your project +Currently there are two ESLint configs you can use: `cnn-eslint-base` and `cnn-react` + +Determine the directory you would like to lint (typically the root) and add one of +the following as a `.eslintrc` file. + +```js +// .eslintrc +{ "extends": "cnn-eslint-base" } +``` +```js +// .eslintrc +{ "extends": "cnn-react" } +``` + +### 4. Run the new script command +```bash +$ npm run lint +``` + +## TODO +- Document creating nested `.eslintrc` files +- Fix stdio cutoff when errors exceed threshold...? +- Add better error / success messaging \ No newline at end of file From 0aa7350b22f0008d59fca60b61bd5da2600bd3be Mon Sep 17 00:00:00 2001 From: pdinh_turner Date: Mon, 6 Nov 2017 10:49:06 -0500 Subject: [PATCH 2/2] updated README --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 07d8ad1..4ef2c78 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,15 @@ ### 1. Add `cnn-birdman` to your existing project. ```bash -$ npm install -D -E bitbucket:vgtf/cnn-birdman +$ npm install -D -E https://github.com/cnnlabs/cnn-birdman.git ``` ### 2. Add to your existing npm scripts: +This will automatically lint your src directory, but to choose different directory use -R option. ```diff "scripts": { -+ "lint": "cnn-birdman run [style|javascript]" // optionally pass in specific check ++ "lint": "cnn-birdman [-R ] run [style|javascript]" // optionally pass in specific } ``` ### 3. Add a `.eslintrc` into your project