Skip to content

Commit e1463cc

Browse files
committed
update README
1 parent dd6beed commit e1463cc

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,36 @@
33
## Installation
44

55
```sh
6-
$ npm install --save-dev eslint
7-
$ npm install --save-dev eslint-plugin-github
6+
$ npm install --save-dev eslint eslint-plugin-github
87
```
98

10-
Run initialization wizard.
9+
## Setup
1110

12-
```sh
13-
$ node_modules/.bin/eslint-github-init
11+
Add `github` to your list of plugins in your ESLint config.
12+
13+
JSON ESLint config example:
14+
```json
15+
{
16+
"plugins": ["github"]
17+
}
1418
```
1519

16-
Set up `npm run lint` script.
20+
Extend the configs you wish to use.
1721

22+
JSON ESLint config example:
1823
```json
1924
{
20-
"private": true,
21-
"scripts": {
22-
"lint": "github-lint"
23-
}
25+
"extends": ["extends": ["plugin:github/recommended"]
2426
}
2527
```
2628

27-
The `github-lint` command will run various checkers and linters depending on your project configuration.
29+
The available configs are:
30+
31+
- `app`
32+
- Rules useful for github applications.
33+
- `browser`
34+
- Useful rules when shipping your app to the browser.
35+
- `recommended`
36+
- Recommended rules for every application.
37+
- `typescript`
38+
- Useful rules when writing TypeScript.

0 commit comments

Comments
 (0)