kart7990 / virtualpitwall

https://staging.virtualpitwall.com
Other
15 stars 7 forks source link

Added prettier config #23

Closed elft3r closed 5 months ago

elft3r commented 5 months ago

Hey @kart7990, I looked again into the formatting problems that I had. While doing that I figured, it would make sense to include prettier into the mix. This could help to have properly formatted code and also prevent discussions from happening.

What is your take on this?

I also added husky and lint-staged so that the code gets automatically formatted before being committed.

The last question is, if we want to do one pass to format the whole code base, or just do it whenever we make a change to a file?

Happy to hear your feedback on this.

Best, Jochen

elft3r commented 5 months ago

Another question would be if we should add GitHub actions to run prettier, linter, .... Or do you also want to run these kinds of things in Azure?

kart7990 commented 5 months ago

it would make sense to include prettier into the mix. This could help to have properly formatted code and also prevent discussions from happening.

I don't have any issues with it if you suggest it. I'm all for consistency, keeping things easy to read, and reducing nit picks in reviews with static analysis/linters.

The last question is, if we want to do one pass to format the whole code base, or just do it whenever we make a change to a file?

I would say let's do it on the whole code base now. It's just us in here at the moment, the codebase isn't that big, and it will make reading the diff of future changes easier without having to sift through the formatting changes on top of real changes.

I also added husky and lint-staged so that the code gets automatically formatted before being committed.

Sounds cool, I'm not familiar with these, but I'll check them out. No issues including it though if you think it'll be good to have 👍

kart7990 commented 5 months ago

Another question would be if we should add GitHub actions to run prettier, linter, .... Or do you also want to run these kinds of things in Azure?

I'm fine running those through GitHub actions. For deploy purposes, anything related to building and packaging the app needs to be done on azure.

Well, I guess really we could even build it here and only do the deploy with Azure, but it's already wired up so I don't see a huge advantage to changing that. Unless not being able to see build output becomes problematic. Really should be the same as running the build commands locally, but I know that's not always the case.