Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharing #229

Merged
merged 12 commits into from
Sep 25, 2016
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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eliasCodes could we specify a bin script in package.json ?
see: https://docs.npmjs.com/files/package.json#bin

Copy link
Contributor Author

@eliasmalik eliasmalik Sep 23, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have 82796e6

Or do you mean changing the script to "lint": "goodparts path/to/files/for/linting"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good start. thanks!

}
```

<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": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gitter handle may be better! hehe

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nelsonic included too!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to github handles and added @nelsonic

"nelsonic",
"eliascodes",
"jrans",
"shouston3",
"SimonLab"
]

}