File tree Expand file tree Collapse file tree 1 file changed +22
-11
lines changed Expand file tree Collapse file tree 1 file changed +22
-11
lines changed Original file line number Diff line number Diff line change 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. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments