-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Basic pass through JSHint #82
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
Conversation
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.
What is the reason for commenting this out?
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.
It was unused.
I figured it might be a bit controversial given its proximity to the ECDSA code, therefore I didn't remove the line entirely.
|
A squashed commit would be great! And this definitely cleans things up a bit. As I mentioned in my email to you, I'm currently working on wallet.js so this will create unfortunate conflict with the wallet branch I'm working on:https://github.com/bitcoinjs/bitcoinjs-lib/tree/wallet. Mind if we remove the changes to wallet.js and its tests for now? And once I get the wallet branch in shape (in a day or two, by my estimate), you are certainly welcome to run lint again and submit another PR. |
|
For sure, I figured the biggest problem with this commit was how much it touched. No worries, I'll extract them out and then squash the commits. |
|
@weilu I squashed all the previous commits down and removed all changes to wallet.js. I've also added in some changes I made to transaction.js which involved using Array.prototype.forEach rather than classic counter foreach loops. I haven't noticed a clear pattern on coding style in regards to using forEach/map/filter versus more verbose alternatives; so I was curious as to your thoughts on that change. |
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.
Is this a bug? (That is, type not being used)
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.
Possible. I have yet to test the multi-sig related methods. @dcousens are you keen on walking through the related methods and add necessary test cases?
|
Rebased on 9358a40 (current HEAD). |
|
Thanks @dcousens! |
Just put the src/ directory through a basic first pass in JSHint.
Have mostly focused on unused variables, variable re-declarations and invalid line breaks which could have been causing unknown errors.
I don't know if
Wallet.mkSendeven works, simply because the code before this was using theBitcoin.namespace, which doesn't even exist now?Whole area is in desperate need of tests.
edit: Understandable [if this is accepted] that you may want these commits squashed.