chore: bump husky and clean up scripts
A few minor improvements that might be helpful for #253 :
- Bumping Husky
- Removing Husky from a child package (this will be handled by monorepo setup)
- Some documentation on why
.husky/install.mjsis present (almost removed it 😅 ) - Simplifying
.husky/pre-commit(see version 9.1.1) - Simplifying root
package.json:- Both dependencies are actually dev dependencies
-
lint-stagedscript can be removed as it's directly ran by Husky now
Great work on this one @alcpereira! I haven’t tested this, but does it fix the formatting issues if you try to push an unformatted file?
@alcpereira @giovannibenussi should we update the .prettierrc file to contain the full configuration so it's more explicit for anyone not familiar with Prettier what's going on here?
@alcpereira @giovannibenussi should we update the
.prettierrcfile to contain the full configuration so it's more explicit for anyone not familiar with Prettier what's going on here?
As you prefer, IMO most JS developers are used to Prettier default configuration -it has been the standard for years- and it's common practice to just include what should be overwritten in the config. Including all defaults, just to be explicit, can be a bit cumbersome due to the quantity of options (docs).
Also by including formatting in the pre-commit hook + format check in CI, this issue should never happen again (well you can --no-verify your commit and skip CI, but at this point we can't do anything for you).
I do agree that Prettier is a common standard. I've used Prettier since day one, and it's great. But even by state of JS survey standards, there's still a chunk of folks not heard of it or use it regularly, including some maintainers of this repo.
It's good we have CI now, so people don't need to worry about it. My thought for including the default options (as gross as that is btw) would make it more clear to those discovering a prettier file that by glancing over the defaults, it resembles some formatting tooling.
Anyways, just my opinion. Continue as is by all means!
Can we merge this PR and I open another one to include a more verbose .prettierrc?
I think the current file is fine. I think it's more confusing for devs to have a setting for something that must be the default (it makes me wonder why it's explicitly defined) and also adds more noise to the whole file. There's a point to be more verbose but I think it's better to leave it as it is.
There's a merge conflict on package.json now that I merged bunch of other PRs.
Fixed @penberg!