DEV Community

How to Config React Project with Next.js, Typescript, TSLint, and Jest?

Andrew on January 05, 2020

CRA (Create-React-App) provides an easy way to start our React project. But there are still lots of things we can do to make the project more easy...
Collapse
 
iamsiddhant05 profile image
Siddhant Sahay •

Amazing article, I had a query. I already have my project in javascript and was thinking of migrating to ts, just wanted to know if this can be done in the same project (running js and ts) or will i have to start a new project for refactored code?

Collapse
 
oahehc profile image
Andrew •

Yes, you can apply typescript into your current project, then migrate the js files into ts one by one.

Collapse
 
oahehc profile image
Andrew •

I just saw this article, it might be helpful.

2ality.com/2020/04/migrating-to-ty...

Collapse
 
vadorequest profile image
Vadorequest •

If you feel overwhelmed by all the config you need to do, check out github.com/UnlyEd/next-right-now which is a boilerplate with Next.js/Zeit/TypeScript/Jest/Cypress built-in. You may save yourself quite some time.

Collapse
 
oahehc profile image
Andrew •

Thanks for sharing.

Collapse
 
mucorolle profile image
Muco Rolle Tresor •

thanks for the article

Collapse
 
loriick profile image
Travailleur Lorick •

good article I really like it

Collapse
 
n00nietzsche profile image
n00nietzsche •

Sorry to say that TSLint now is deprecated so it would better to use ESLint instead. github.com/palantir/tslint/issues/... the URL is about TSLint deprecated issue.

Collapse
 
oahehc profile image
Andrew •

Exactly, thanks for pointing out this issue. I will update the article later.

Collapse
 
elanandkumar profile image
Anand Kumar •

Very well writtenn.

Collapse
 
igcp profile image
Igor Conde •

Thanks for the article, I was looking for such an article, and really excellent!
thank you