Skip to content

Commit

Permalink
Merge pull request #229 from dwyl/sharing
Browse files Browse the repository at this point in the history
Sharing
  • Loading branch information
nelsonic authored Sep 25, 2016
2 parents cb2d66b + 24f6ce3 commit 6377efb
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@ http://eslint.org/docs/about/


## *How?*

> This is where _you_ come in @SimonLab ... :wink:
Simply install our configuration
```
$ npm i --save-dev goodparts
```
Then you can add the following script to your `package.json`:
```
{
"lint": "node_modules/.bin/goodparts path/to/files/for/linting"
}
```

<br />

Expand Down
12 changes: 12 additions & 0 deletions bin/cmd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env node

var path = require('path');
var eslint = require('eslint');

var configFilePath = path.resolve(__dirname, '..', '.eslintrc.js')
var cli, report;

cli = new eslint.CLIEngine({ configFile: configFilePath });
report = cli.executeOnFiles(process.argv.slice(2));

console.log(cli.getFormatter()(report.results)); // eslint-disable-line
16 changes: 14 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@
"name": "goodparts",
"description": "An ESLint Style that only allows JavaScript the Good Parts (and \"Better Parts\") in your codebase.",
"version": "0.0.1",
"main": ".eslintrc.js",
"scripts": {
"test": "tape test/"
},
"devDependencies": {
"eslint": "^3.5.0",
"tape": "^4.6.0"
}
},
"dependencies": {
"eslint": "^3.5.0"
},
"bin": "./bin/cmd.js",
"contributors": [
"nelsonic",
"eliascodes",
"jrans",
"shouston3",
"SimonLab"
]

}

0 comments on commit 6377efb

Please sign in to comment.