Add pre-commit checks and auto fixes
Code style checks are now automatically performed when committing to the
local repository, so issues can be detected before running a CI
pipeline. Checks are performed using the pre-commit
tool which runs
a few integrated checks as well as Prettier and Stylelint. Futhermore,
auto fixes are applied when possible.
pre-commit
is a Python-based tool, which is automatically installed
with a postinstall
script using pip
. Python and pip need to be
installed manually.
If the git hook needs to be removed for whatever reason,
pre-commit uninstall
can be run to handle this.
Related: particify/dev/common-concerns#45
Edited by Daniel Gerhardt