How to Configure Your Projects like a pro

Phanendra Guptha Katta
5 min readOct 30, 2023

In this article, we will delve into the process of setting up your Node.js projects for scalability, utilizing the following essential tools and practices: Eslint for code linting, Prettier for code formatting, lint-staged for pre-commit checks, and conventional commits for consistent version control messages. This configuration ensures an enhanced developer experience for the project.

In this article, I’ve chosen Yarn as my package manager, but feel free to opt for alternative package managers like npm, pnpm. Here, we are using create-react-app for your boilerplate template, similar steps can be applied to your Node.js projects.

Eslint

Eslint will help identify linting errors, and the React team has created the “eslint-config-react-app” project to simplify Eslint configuration for React projects.

Add the following packages as dev dependencies, as these changes will not impact the production deployment.

yarn add -D eslint-config-react-app eslint

Generate a “.eslintrc.json” file to set up our Eslint configuration.

touch .eslintrc.json

Copy and paste the following configuration into the “.eslintrc.json” file.

{
"extends": "react-app"
}

--

--