build: add husky to automatically format code #67

Closed
tasiaiso wants to merge 1 commits from tasiaiso/tildefriends:tasiaiso-husky-init into main
Contributor

Manually running prettier to format code is hassle: just in the first page of the commit tree there are 5 commits that mention prettier.

  • husky installs a git hook to run make format every time you commit new code
  • if make format fails (if a dependency is missing or prettier throws an error), the hook will still succeed as to not block people for dumb reasons
  • pin prettier and husky to 3.2.5 and 9.0.11 respectively
  • add prettier as a dependency for the make format rule
Manually running prettier to format code is hassle: just in the first page of the [commit tree](https://dev.tildefriends.net/cory/tildefriends/commits/branch/main) there are 5 commits that mention prettier. - husky installs a git hook to run make format every time you commit new code - if `make format` fails (if a dependency is missing or prettier throws an error), the hook will still succeed as to not block people for dumb reasons - pin prettier and husky to 3.2.5 and 9.0.11 respectively - add prettier as a dependency for the `make format` rule
tasiaiso added 1 commit 2024-06-04 09:15:49 -04:00
- husky installs a git hook to run make format every time you commit new code
- if `make format` fails (if a dependency is missing or prettier throws an error), the hook will still succeed as to not block people for dumb reasons
- pin prettier and husky to 3.2.5 and 9.0.11 respectively
- add prettier as a dependency for the `make format` rule
Owner

Sorry, I know I've been sitting on this for ages. I've been waffling on it, and I don't like this level of automated changes to code in the repo. I like it being a manual step. Although maybe I do it compulsively, it doesn't consume many mental cycles.

I forgot what project I'm getting the policy from, but I'll aim to keep formatting mostly standardized each release.

Thanks for taking the initiative to do this, though.

Sorry, I know I've been sitting on this for ages. I've been waffling on it, and I don't like this level of automated changes to code in the repo. I like it being a manual step. Although maybe I do it compulsively, it doesn't consume many mental cycles. I forgot what project I'm getting the policy from, but I'll aim to keep formatting mostly standardized each release. Thanks for taking the initiative to do this, though.
cory closed this pull request 2024-09-18 19:39:26 -04:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cory/tildefriends#67
No description provided.