---
title: "Discussion on \"Setting up pre-commit hook with husky to automate code formatting🪝\" | Hashnode"
description: "Discussion on \"Setting up pre-commit hook with husky to automate code formatting🪝\". Intro ✨\nI have a React TypeScript project for which I want to automate code formatting before committing changes to the repo, hence in this tutorial, I will teach you to do the same using husky, lint-staged & prettier.\nInstalling and Setting up Husky..."
url: "https://hashnode.com/posts/setting-up-pre-commit-hook-with-husky-to-automate-code-formatting/644f5d530d8be6c4aab146d1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Setting up pre-commit hook with husky to automate code formatting🪝](https://sridharmaskeri.hashnode.dev/setting-up-pre-commit-hook-with-husky-to-automate-code-formatting?utm_source=hashnode&utm_medium=feed)

Intro ✨ I have a React TypeScript project for which I want to automate code formatting before committing changes to the repo, hence in this tutorial, I will teach you to do the same using husky, lint-staged & prettier. Installing and Setting up Husky...

May 1, 2023 · 2 min read · sridharmaskeri.hashnode.dev  
Updated May 22, 2023  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#husky](https://hashnode.com/tag/husky)
-   [#prettier](https://hashnode.com/tag/prettier)
-   [#lint-staged](https://hashnode.com/tag/lint-staged)

## Written by

[Sridhar Maskeri](https://hashnode.com/@sridharmaskeri)

@sridharmaskeri · Goa, India

  
[View profile](https://hashnode.com/@sridharmaskeri)

SDE | Frontend Developer | Graphic Design Enthusiast

Hi there! 👋 I am a passionate and dedicated Web Developer with a keen interest in UI/UX design. I have a strong work ethic and am always eager to learn and grow in my field. I am also a technical blogger, sharing insights on web development and more. If you're looking for a creative and driven developer who is always up for a challenge, I would love to connect with you! 🙌

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
