1
- # eslint-import-resolver-ts
1
+ # eslint-import-resolver-typescript
2
2
3
- [ ![ GitHub Actions] ( https://github.com/rx-ts /eslint-import-resolver-ts /workflows/Node%20CI/badge.svg )] ( https://github.com/rx-ts /eslint-import-resolver-ts /actions )
4
- [ ![ type-coverage] ( https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Frx-ts %2Feslint-import-resolver-ts %2Fmaster%2Fpackage.json )] ( https://github.com/plantain-00/type-coverage )
5
- [ ![ npm] ( https://img.shields.io/npm/v/eslint-import-resolver-ts .svg )] ( https://www.npmjs.com/package/eslint-import-resolver-ts )
6
- [ ![ GitHub Release] ( https://img.shields.io/github/release/rx-ts /eslint-import-resolver-ts )] ( https://github.com/rx-ts /eslint-import-resolver-ts /releases )
3
+ [ ![ GitHub Actions] ( https://github.com/alexgorbatchev /eslint-import-resolver-typescript /workflows/Node%20CI/badge.svg )] ( https://github.com/alexgorbatchev /eslint-import-resolver-typescript /actions )
4
+ [ ![ type-coverage] ( https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Falexgorbatchev %2Feslint-import-resolver-typescript %2Fmaster%2Fpackage.json )] ( https://github.com/plantain-00/type-coverage )
5
+ [ ![ npm] ( https://img.shields.io/npm/v/eslint-import-resolver-typescript .svg )] ( https://www.npmjs.com/package/eslint-import-resolver-typescript )
6
+ [ ![ GitHub Release] ( https://img.shields.io/github/release/alexgorbatchev /eslint-import-resolver-typescript )] ( https://github.com/alexgorbatchev /eslint-import-resolver-typescript /releases )
7
7
8
- [ ![ David Peer] ( https://img.shields.io/david/peer/rx-ts /eslint-import-resolver-ts .svg )] ( https://david-dm.org/rx-ts /eslint-import-resolver-ts ?type=peer )
9
- [ ![ David] ( https://img.shields.io/david/rx-ts /eslint-import-resolver-ts .svg )] ( https://david-dm.org/rx-ts /eslint-import-resolver-ts )
10
- [ ![ David Dev] ( https://img.shields.io/david/dev/rx-ts /eslint-import-resolver-ts .svg )] ( https://david-dm.org/rx-ts /eslint-import-resolver-ts ?type=dev )
8
+ [ ![ David Peer] ( https://img.shields.io/david/peer/alexgorbatchev /eslint-import-resolver-typescript .svg )] ( https://david-dm.org/alexgorbatchev /eslint-import-resolver-typescript ?type=peer )
9
+ [ ![ David] ( https://img.shields.io/david/alexgorbatchev /eslint-import-resolver-typescript .svg )] ( https://david-dm.org/alexgorbatchev /eslint-import-resolver-typescript )
10
+ [ ![ David Dev] ( https://img.shields.io/david/dev/alexgorbatchev /eslint-import-resolver-typescript .svg )] ( https://david-dm.org/alexgorbatchev /eslint-import-resolver-typescript ?type=dev )
11
11
12
12
[ ![ Conventional Commits] ( https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg )] ( https://conventionalcommits.org )
13
13
[ ![ JavaScript Style Guide] ( https://img.shields.io/badge/code_style-standard-brightgreen.svg )] ( https://standardjs.com )
@@ -33,10 +33,10 @@ This means you can:
33
33
34
34
``` sh
35
35
# npm
36
- npm i -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-ts
36
+ npm i -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-typescript
37
37
38
38
# yarn
39
- yarn add -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-ts
39
+ yarn add -D eslint-plugin-import @typescript-eslint/parser eslint-import-resolver-typescript
40
40
```
41
41
42
42
## Configuration
@@ -56,32 +56,32 @@ Add the following to your `.eslintrc` config:
56
56
},
57
57
" import/resolver" : {
58
58
// use <root>/tsconfig.json
59
- " ts " : {
59
+ " typescript " : {
60
60
" alwaysTryTypes" : true // always try to resolve types under `<roo/>@types` directory even it doesn't contain any source code, like `@types/unist`
61
61
},
62
62
63
63
// use <root>/path/to/folder/tsconfig.json
64
- " ts " : {
64
+ " typescript " : {
65
65
" directory" : " ./path/to/folder"
66
66
},
67
67
68
68
// Multiple tsconfigs (Useful for monorepos)
69
69
70
70
// use a glob pattern
71
- " ts " : {
71
+ " typescript " : {
72
72
" directory" : " ./packages/*/tsconfig.json"
73
73
},
74
74
75
75
// use an array
76
- " ts " : {
76
+ " typescript " : {
77
77
" directory" : [
78
78
" ./packages/module-a/tsconfig.json" ,
79
79
" ./packages/module-b/tsconfig.json"
80
80
]
81
81
},
82
82
83
83
// use an array of glob patterns
84
- " ts " : {
84
+ " typescript " : {
85
85
" directory" : [
86
86
" ./packages/*/tsconfig.json" ,
87
87
" ./other-packages/*/tsconfig.json"
@@ -99,6 +99,6 @@ Add the following to your `.eslintrc` config:
99
99
- Make sure that ` yarn lint ` passes without conflicts.
100
100
- Make sure your code changes match our [ type-coverage] ( https://github.com/plantain-00/type-coverage ) settings: ` yarn type-coverage ` .
101
101
102
- We have [ GitHub Actions] ( https://github.com/rx-ts /eslint-import-resolver-ts /actions ) which will run the above commands on your PRs.
102
+ We have [ GitHub Actions] ( https://github.com/alexgorbatchev /eslint-import-resolver-typescript /actions ) which will run the above commands on your PRs.
103
103
104
104
If either fails, we won't be able to merge your PR until it's fixed.
0 commit comments