How to lint TypeScript with ESLint

How to lint TypeScript with ESLint

Kent C. Dodds

5 лет назад

5,765 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@tomtobac
@tomtobac - 03.01.2019 21:12

Hey Kent! Great job! Just a small detail, the text in the video I can barely read it. I mean it hurt to read any text, it's like is coded with a low-graphic even if I put in 720p HD. Could you improve it? Thanks!

Ответить
@lavi476
@lavi476 - 03.01.2019 23:15

way not use TSlint ?

Ответить
@xWe2s
@xWe2s - 08.01.2019 09:38

Huh, I finally may jump on that train because of you.

Ответить
@xWe2s
@xWe2s - 08.01.2019 09:42

Btw, I'm on the 6th minute, but to note. (edit: yea you said it)
What I'm doing is using the babel-eslint and put the .ts and .tsx extensions to the import resolver settings (I think, eslint-plugin-import-resolver is called, both Airbnb and Standard has it). I really don't want to trust typescript-eslint-parser. BUT, using that approach, I'm not sure what happens if you want to use features that TS is not supporting, but because you are using Babel to compile TS, and you want lets say stage 2 things (as far as i know TS support only >= stage 3+? )? So not sure what happens.

Ответить
@MerisBahtijaragic
@MerisBahtijaragic - 11.03.2019 11:03

A great post, thanks for posting the repo aswell.

Ответить
@filipitskov3742
@filipitskov3742 - 23.03.2019 02:02

Seems like after adding these parser options you have to restart VScode Eslint extension (by restarting VScode), or else the changes are not getting picked by extension

Ответить