-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup Husky for auto formatting on pre commit #856
Conversation
``` | ||
npm install husky lint-staged --save-dev | ||
``` | ||
2. create lint-staged.config.js file in root directory and add following code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same goes here. Since you've pushed lint-staged.config.js
file with your pr, it should be available in the root directory after merging your pr right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I should write husky post installation setup. I will keep in mind thank you. 😊
@MuntazirHaider You can define a postinstall to setup husky.. Follow, https://typicode.github.io/husky/getting-started.html |
this issue is assigned to @Sarfraz-droid so I should modify this or should I wait. |
@MuntazirHaider you can work on it, since you have initialized the setup. We will merge the changes if the setup is successful |
Can you please tell me how can I check my changes is working perfectly or not. |
Description
I setup husky in following steps
Related Issue
Fixes #854
Motivation and Context
There have been multiple issues while reviewing due to issues with conflicting formats.
Adding Husky to your project to enforce code formatting and linting before commits is a great way to maintain code quality.
How Has This Been Tested?
Before committing, Husky and Lint-Staged will automatically run the specified scripts on the staged files. If there are formatting or linting issues, the commit will be blocked until you fix them. It does not affect any other areas of the code.
Screenshots or GIF (In case of UI changes):
Types of changes
Checklist: