assign variables: give a reason for the assignment#656
assign variables: give a reason for the assignment#656ljharb merged 1 commit intoairbnb:masterfrom eddiemonge:patch-1
Conversation
README.md
Outdated
There was a problem hiding this comment.
this isn't good, since it's reassigning a const - it will throw.
There was a problem hiding this comment.
oops you are right. Should be lets
There was a problem hiding this comment.
(also, there shouldn't be spaces inside brackets: [0])
|
removed the first example as it seemed like a duplicate |
|
LGTM, just needs a fresh rebase :-) thanks! |
The variable assignment wasn't necessary. This gives a reason to have it there
|
rebased. not sure why I needed to but did it anyway. |
|
Thanks! If it's on top of latest master I can merge it in locally without a merge commit. |
|
If you are doing it locally then its trivial to also do the rebase there as well. Not saying there isn't a reason for the process but it makes it harder to for people trying to help. How often should I be rebasing, every time there is a new commit to master, every day, etc,? A submitter should only rebase if there are conflicts or to squash imo. |
I know the examples are contrived but they should at least be best practices in themselves. The variable assignment wasn't necessary. The function could have passed the getter result directly.
https://github.com/airbnb/javascript#13.4
This wasn't necessary:
since it could have been written like this:
This change gives a reason to have it there.