Introduce auto format for server
Opened this issue · 3 comments
anuragshukla06 commented
Introduce auto format for server
anuragshukla06 commented
- Look at doc prettier rc
- Use git hooks to ensure that the files are in the format before someone pushes the code.
thedroiddiv commented
see commit 7697039
The main changes are in package.json and .husky/pre-commit, everything else is just formatting from prettier.
https://typicode.github.io/husky/#/
thedroiddiv commented
@Irischrome Since you’re working on it thought 7697039 might help.
Sorry, I didn't mention it earlier, I was curious about it and I recollect, had used it somewhere in my older projects.
The same is implemented here as well.
It uses a node package called ‘husky’.
I wanted it to be done without husky, even wrote a script and added it preInstall to copy the git hook but realized that would only work on Mac and Linux. Maybe if you want, could find another way to do it without an external package.