-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pre-commit-config #298
Conversation
@@ -734,7 +734,11 @@ def update_invoice(cls, order, user, invoice): | |||
if not order.taker_bond: | |||
return False, {"bad_request": "Wait for your order to be taken."} | |||
if ( | |||
not ( order.taker_bond.status == order.maker_bond.status == LNPayment.Status.LOCKED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the changes introduced by that 'annoy black' PR in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool!
We probably should add those 4 steps at the top of setup.md
as they apply to all contributors.
Maybe prettier can be fixed? I do not manage to trigger it. Tried changing the files:
key too to no success.
.pre-commit-config.yaml
Outdated
- merge-commit | ||
language: system | ||
files: ^frontend/ | ||
types: [javascript, jsx, ts, tsx, css, markdown, json] # uses https://github.com/pre-commit/identify |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First time using pre-commit
pip package. This is really powerful!
It seems it is not running npm run format
when I add some style mistake on the /frontend
prettier-frontend....................................(no files to check) Skipped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh, was a mistake with the types
key. Changed it to types_or
Awesome, merging! 🚀 We did not have a rewarded task created for this PR beforehand. But it's actually pretty important and will make or life easier. Let's add a few sats to the positive Karma, please submit an invoice for 100K Sats from a proxy wallet with a long expiration time. |
@Reckless-Satoshi Thank you ❤️ 🤗
|
fbe7afbb121b363e7f12fb2ed445116216698ef1a4dfb1be4e54c1f81cf9e5b4 |
What does this PR do?
Adds a pre-commit config to run linters/formaters before committing
Steps every contributor must follow before working:
pip install pre-commit
pre-commit install
Checklist before merging
cd frontend; npm run format
. If it's a mobile app feature I rancd mobile; npm run format
.