I discover a new world with strongly typed languages like C/C++ or Java. One major advantage of strongly typed language is to catch errors earlier in the development process. In the end, you write better code with fewer bugs in your application.
Recently, TypeScript grows in popularity among JS community. Now, almost all NPM packages provide support for TypeScript. In most NPM package documentation, you can find references on how to install and use with TypeScript.
So, now all my React projects are written in TypeScript and can't live without it.
You can define all the rules one by one but it's extremely time-consuming to do it yourself. Thankfully, you can use some already configured rules for ESLint with ESLint config Airbnb, one of the most famous shared ESLint configs.
In ESLint, you can enforce your preference to a JS code style, but the options are limited. The best way to have a consistent look for your code is to use Prettier on top of ESLint.
Now, your team and you have the same coding style. It makes the development experience much more pleasant to write code. For new developers in your codebase, they can also ramp up more quickly.
Hoping this article convinces you to use these tools. If you don't want to lose your time configuring them and learn how to use them, I've open-sourced my React Boilerplate on GitHub. The perfect template to start any React projects with Next JS and Tailwind CSS.
If you interested to go further and learn how to configure these tools, you can read the article How to configure ESLint, Prettier and TypeScript in React project.