File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1717 "test" : " ava"
1818 },
1919 "files" : [
20- " index.js"
20+ " index.js" ,
21+ " space.js"
2122 ],
2223 "keywords" : [
2324 " typescript" ,
Original file line number Diff line number Diff line change @@ -24,6 +24,20 @@ Add some ESLint config to your package.json (or `.eslintrc`):
2424}
2525```
2626
27+ Use the ` space ` sub-config if you want 2 space indentation instead of tabs:
28+
29+ ``` json
30+ {
31+ "name" : " my-awesome-project" ,
32+ "eslintConfig" : {
33+ "extends" : [
34+ " xo" ,
35+ " xo-typescript/space"
36+ ]
37+ }
38+ }
39+ ```
40+
2741* Note:* If your ` tsconfig.json ` is not in the same directory as ` package.json ` , you will have to set the path yourself:
2842
2943``` json
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+ const path = require ( 'path' ) ;
3+
4+ module . exports = {
5+ extends : path . join ( __dirname , 'index.js' ) ,
6+ rules : {
7+ '@typescript-eslint/indent' : [
8+ 'error' ,
9+ 2 ,
10+ {
11+ SwitchCase : 1
12+ }
13+ ]
14+ }
15+ } ;
You can’t perform that action at this time.
0 commit comments