microsoft/rural-crowdsourcing-toolkit

Introduce auto format for server

Opened this issue · 3 comments

Introduce auto format for server
  1. Look at doc prettier rc
  2. Use git hooks to ensure that the files are in the format before someone pushes the code.

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/#/

@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.