samarsault / noodle

Learning management system
4 stars 5 forks source link

Lint pre-commit #79

Open samarsault opened 4 years ago

samarsault commented 4 years ago

Add a git pre commit hook to run a lint fix.

Devanshu24 commented 4 years ago

I had thought of this, but when I read on it I found that it is something that every user will have to configure on their own system (which doesn't help us much) Or is there some other option as well, which works better?

samarsault commented 4 years ago

Yes, it has to be configured by each user. To make this easer, what we can do is:

  1. Provide the hook
  2. A command to link that to .git/hooks
Devanshu24 commented 4 years ago

Oh okay, so in that case, the CI will always pass the linting test, right? Then why don't we add a hook for the jest tests also, Although the CI will be rendered almost immaterial...

samarsault commented 4 years ago

No, not all lint errors are fixed automatically. Plus, tests take more time to run as the number of tests increases.

Devanshu24 commented 4 years ago

No, not all lint errors are fixed automatically.

Oh yes, right. I meant the commit won't happen until you fix all the errors right?

Plus, tests take more time to run as the number of tests increases.

Didn't fully understand, are you saying we won't have a hook for tests because of this