Speedcubing-Canada / speedcubing-canada-web

https://speedcubingcanada.org
2 stars 3 forks source link

Re-configure repo as NPM-style monorepo, add prettier with pre-commit hook #52

Closed JonEsparaz closed 11 months ago

JonEsparaz commented 11 months ago

I've re-configured the repo as an NPM-style monorepo (defining the a root-level package.json and package-lock.json and specifying app as a workspace), which is mostly because the Husky installation needs to be at the same level as the .git directory. Having a root-level pre-commit hook will allow us to add linters and formatters for the backend and other future sub-projects (if desired).

The remaining changes involve adding prettier, adding the aforementioned git hook to run prettier on commit, and format all existing files using prettier.