Improve dev-x with prettier
and husky
hooks
#77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolve #75
To have consistent formatting across the project and facilitate maintenance and contributions I've added
prettier
(with an import-statements sorting plugin to improve readability) and git-hooks support withhusky
.Git hooks with
husky
formats code and blocks commits until all the desired conditions are met.The current configuration formats, lints and tests code, before allowing users to commit changes.
Further improvements to the dev-x and contributions could be added by making the repo commitizen friendly
The above message has been included in the commit's description.
The changelog has been updated to reflect the changes, with the version Unreleased to facilitate library moderation.
The prettier configuration mimicks the state of the current codebase.
The added dependencies are development dependencies.
After merging, make sure to run
yarn format
project-wise. CHANGELOG has been exempted from formatting, although eligible.