anitab-org / anitab-forms-web

AnitaB Forms (web), an application to process smaller 4-week or full day programs to contribute to open source projects. Similar to GSoC, Outreachy, or RGSoC. This is the web app.
GNU General Public License v3.0
42 stars 78 forks source link

Add a check before committing locally #156

Closed nellyk closed 2 years ago

nellyk commented 2 years ago

Describe the bug

Currently when commiting changes no checks are made to ensure that the changes made do not broken any of the tests/linting. These can introduce bugs.

I propose the use of husky https://github.com/typicode/husky which would add a pre commit hook

To Reproduce

Steps to reproduce the behavior: Try committing any changes locally with an error, this will pass through correctly without any errors.

Expected behavior

A message preventing the committing of changes unless the errors are resolved locally.

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

codesankalp commented 2 years ago

It's good to have the pre-commit hook, so it seems to be a valid enhancement. Make sure husky should be in development packages.