News for hackers. Stuff that matters.
Re:Future of TypeScript on ESLint by atombender on Friday January 18, 2019 @05:19PM (#18943640)
How's the migration path? I use TypeScript for new React apps I build, but I'm dealing with some JS projects where there's just no way to convert everything to TS all at once.

Does TS work well alongside legacy JS so you can update individual files incrementally as you go along? I remember trying it once and facing some unexpected blockers, but I don't remember what they were.

Re:Future of TypeScript on ESLint by ng12 on Friday January 18, 2019 @05:27PM (#18943695)
It's very seamless. There's a flag, allowJs, that lets you import js files with only sanity checks (no actual typechecking). You can then start converting individual files to Typescript as you go.
Re:Future of TypeScript on ESLint by atombender on Friday January 18, 2019 @05:38PM (#18943788)
Thanks! I wish I could remember what I ran into the last time. I guess I'll just have to try.
Re:Future of TypeScript on ESLint by addicted on Friday January 18, 2019 @07:41PM (#18944482)
I believe the allowJS flag is new and disabled by default. It may not have existed when you last tried. That’s what happened with our team. We tried to switch in either 0.x or low 1.x and at the time I believe we had to convert everything to TS (although, we may just not have been aware of the allowJS flag at the time).