Hi Kent! Thanks for the helpful video - I'm definitely going to stick with tslint! Btw, TypeScript does know that console.log returns void, but I think you need to turn on `noImplicitAny` (in `tsconfig.json`) to get it to complain. (You can try it in the TS playground here: www.typescriptlang.org/play/#src=console.log(%22hi%22)%0D%0A%5B1%5D.forEach(n%20%3D%3E%20console.log(n))%3B%0D%0A - it's in the options dropdown) Absolutely with you about using prettier to *fix* formatting issues rather than a linter to *spot* formatting issues. My team takes that a step further and uses prettier to insert the semicolons automatically; using our configuration prettier would combine those two statements into a single line, making it obvious to any developer how it's being interpreted (even if they don't understand the awful ASI rules) and then TypeScript comes and complains about the types.
@MerisBahtijaragic5 жыл бұрын
A great post, thanks for posting the repo aswell.
@jed_fox15 жыл бұрын
We’re working on finding/making alternatives to all the TSLint rules over at eslint-plugin-typescript: github.com/bradzacher/eslint-plugin-typescript/blob/master/ROADMAP.md
@xWe2s5 жыл бұрын
Huh, I finally may jump on that train because of you.
@tomtobac5 жыл бұрын
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!
@KentCDodds-vids5 жыл бұрын
I've figured out what happened there and fixed it.
@xWe2s5 жыл бұрын
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.
@KentCDodds-vids5 жыл бұрын
If you're using babel's parser then you should be good with whatever babel supports.
@xWe2s5 жыл бұрын
@@KentCDodds-vids Kool. I should try it then.
@filipitskov37425 жыл бұрын
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
@lavi4765 жыл бұрын
way not use TSlint ?
@OscarFunes5 жыл бұрын
He explained in the video, they have some internal eslint rules that they didn't want to migrate to tslint