Setup pre-push config
Done
- Add
.pre-commit-config.yaml - Create bash script to run djlint from package.json
QA
- Install pre-commit
- Check out this branch locally
- Try to commit with an error in each of the cases found in
.pre-commit-config.yaml(JS, CSS, HTML, PYTHON)
Issue / Card
Fixes https://warthogs.atlassian.net/browse/WD-19061
Screenshots
[If relevant, please include a screenshot.]
Help
@petesfrench so far looks good (still reviewing), I just have an observation
- If you tend to make many small commits, pre-commit can be brutal especially for unformatted pages
- What do you think about pre-push hooks? We could run the pre-commit checks as a pre-push script
@petesfrench the script doesn't detect errors in the new commits, just in the staged changes. Also, we should add a note to the readme about copying the file to .git/hooks/pre-push
@samhotep Good suggestions! I have made the changes to the script you suggested
@samhotep It seems I managed to push some incomplete work, we should definitely be checking .py files. Could you take another look please
@pete great work
I'm afraid I can't take credit.
@petesfrench @samhotep Thanks for this piece of work! Are there any updates on this PR?