Skip to content

Commit bdc05aa

Browse files
kirill-konshinbenmosher
authored andcommitted
Update README.md for import-js#1256 (import-js#1277)
1 parent 9bac44e commit bdc05aa

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,22 @@ rules:
144144
# etc...
145145
```
146146

147+
# Typescript
148+
149+
You may use the following shortcut or assemble your own config using the granular settings described below.
150+
151+
Make sure you have installed the [`@typescript-eslint/parser`] which is used in the following configuration. Unfortunately NPM does not allow to list optional peer dependencies.
152+
153+
```yaml
154+
extends:
155+
- eslint:recommended
156+
- plugin:import/errors
157+
- plugin:import/warnings
158+
- plugin:import/typescript # this line does the trick
159+
```
160+
161+
[`@typescript-eslint/parser`]: https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser
162+
147163
# Resolvers
148164

149165
With the advent of module bundlers and the current state of modules and module

config/typescript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
settings: {
1111
'import/extensions': allExtensions,
1212
'import/parsers': {
13-
'typescript-eslint-parser': tsExtensions
13+
'@typescript-eslint/parser': tsExtensions
1414
},
1515
'import/resolver': {
1616
'node': {

0 commit comments

Comments
 (0)