Drift icon indicating copy to clipboard operation
Drift copied to clipboard

Run linter on pre-commit hook

Open jazcarate opened this issue 2 years ago • 5 comments

I'm very bad at running prettier, and there is a very easy way to hook it to the git pre-commit in both server/ and client/

https://prettier.io/docs/en/precommit.html

jazcarate avatar Apr 09 '22 21:04 jazcarate

Additionally, I think there are a lot of files in client/component are not formatted

jazcarate avatar Apr 09 '22 21:04 jazcarate

Additionally, I think there are a lot of files in client/component are not formatted

Thanks, I forgot to lint tsx files. Pushed.

MaxLeiter avatar Apr 10 '22 00:04 MaxLeiter

😅 Ok this might be tricker than expected, as it is one repo with multiple projects, none of the out of the box solutions with Husky will work. I'll leave this issue as is, but I think we'll just close it and be more vigilant 🙈

jazcarate avatar Apr 13 '22 18:04 jazcarate

I can look into writing a custom hook, iirc its really just a bash script

MaxLeiter avatar Apr 13 '22 20:04 MaxLeiter

Yup. But I'm on Windows atm 🙈 So it wouldn't fix my inability to remember to run the linter 😅

jazcarate avatar Apr 13 '22 20:04 jazcarate