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 17
17
"test" : " ava"
18
18
},
19
19
"files" : [
20
- " index.js"
20
+ " index.js" ,
21
+ " space.js"
21
22
],
22
23
"keywords" : [
23
24
" 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`):
24
24
}
25
25
```
26
26
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
+
27
41
* Note:* If your ` tsconfig.json ` is not in the same directory as ` package.json ` , you will have to set the path yourself:
28
42
29
43
``` 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