Skip to content

Commit

Permalink
Merge pull request #6 from dabapps/readme
Browse files Browse the repository at this point in the history
Add some useful info to readme
  • Loading branch information
JakeSidSmith committed Oct 5, 2015
2 parents 6f0412f + 55582d5 commit 465974b
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
# DabApps ESLint Configuration

## Install

If there's a suitable version of eslint-config, include the eslint-config in your package.json.
Recommended to pin a specific version.

```json
"devDependencies": {
"eslint-config": "git://github.com/dabapps/eslint-config.git#1.0.0",
}
```

If you need additional plugins or some slightly different config, you can just copy the rules & create your own eslintrc file (but this shouldn't be nessecary).

You'll also need to include eslint & any other plugins that are needed in your package.json.
You can find out suitable versions from eslint-config's package.json.

```json
"devDependencies": {
"eslint": "=1.5.1",
"eslint-plugin-react": "=3.5.0"
}
```

## Running eslint

Add a script like the following to your package.json (-c defines the config location).

```json
"scripts": {
"eslint": "eslint -c node_modules/eslint-config/.eslintrc 'src/js/'",
}
```

It's recommeneded to then run this in your test script e.g.

```json
"scripts": {
"test": "npm run eslint && npm run jest",
}
```

0 comments on commit 465974b

Please sign in to comment.