diff --git a/README.md b/README.md index d1b7eed..a13c44b 100644 --- a/README.md +++ b/README.md @@ -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" +} +```
diff --git a/bin/cmd.js b/bin/cmd.js new file mode 100755 index 0000000..b1ebbc7 --- /dev/null +++ b/bin/cmd.js @@ -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 diff --git a/package.json b/package.json index d364d58..e87486f 100644 --- a/package.json +++ b/package.json @@ -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" + ] + }