Hello folks. I hope you all are doing well.

In this post, I explain why and how we have set up formatting and linting in our React(typescript) project with ESLint, Prettier, Husky (pre-commit hook), and lint-staged to avoid bad commits and properly format code before committing. So let’s get into it.

Why we have set up linting and formatting?

From my experience, linters most useful function is that it makes the app look like it was written by one person. Every developer has their own style and using ESLint means you have a written agreement about how your JavaScript codebase should look like.

First I’ll talk about ESlint

Rhythm sharma

A passionate software engineer 🚀 having experience in building web apps with JavaScript / Reactjs / Vuejs / Nodejs and some other cool libraries and framework

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store