Closed srish closed 5 years ago
So, we use pre-commit
hooks to automatically fix human errors using prettier. However, I see that people might miss that prettier is automatically fixing the Failure
it noticed. Something like:
git commit
and wait for pre-commit
output. git add <file_name>
. git commit
again. I wouldn't call it a bug
though.
git commit
generated the following output for me without indicating which files are problematic and any hints for fixing the errors in them. Took some time to realize, that I've been happily ignoring the keyword "Failed" in the log and the fact that the git commit is failing.It would be useful to document the steps for using Prettier (https://prettier.io/) before pushing changes, perhaps in the README for now, but in the contribution guidelines in the future. I imagine, the steps would be:
npm install prettier
# Install Prettierprettier --check "*.html"
#Run Prettier through all HTML files