Skip to content

Commit 5b8e19c

Browse files
committed
1 parent de1d672 commit 5b8e19c

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
module.exports = {
33
parser: '@typescript-eslint/parser',
44
parserOptions: {
5-
jsx: true
5+
jsx: true,
6+
project: 'tsconfig.json'
67
},
78
plugins: [
89
'@typescript-eslint'

readme.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $ npm install --save-dev eslint-config-xo eslint-config-xo-typescript @typescrip
1212

1313
## Usage
1414

15-
Add some ESLint config to your package.json:
15+
Add some ESLint config to your package.json (or `.eslintrc`):
1616

1717
```json
1818
{
@@ -26,14 +26,20 @@ Add some ESLint config to your package.json:
2626
}
2727
```
2828

29-
Or to .eslintrc:
29+
*Note:* If your `tsconfig.json` is not in the same directory as `package.json`, you will have to set the path yourself:
3030

3131
```json
3232
{
33-
"extends": [
34-
"xo",
35-
"xo-typescript"
36-
]
33+
"name": "my-awesome-project",
34+
"eslintConfig": {
35+
"extends": [
36+
"xo",
37+
"xo-typescript"
38+
],
39+
"parserOptions": {
40+
"project": "some-path/tsconfig.json"
41+
}
42+
}
3743
}
3844
```
3945

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)