-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Implement Codacy Recommendations #113
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.
Sure 👍 .
Tests pass.
Diff looks good.
if (response.statusCode == 404) { | ||
if (response.statusCode === 404) { |
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.
INFORMATIONAL (NO ACTION NEEDED):
"For fun" (out of curiosity), I checked that the statusCode
is in fact a number, and not a string, when the URL is wrong. (I deliberately edited the hard-coded target URL to be wrong, logged the typeof response.statusCode
here, and I got:
typeof response.statusCode is: number
Script behaves as expected with === 404
as opposed to === "404"
which bugs out.
Overly thorough way of saying this change is good 👍
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.
Thanks a ton for double checking! My intuition in this space said they should be numbers and I didn't question it. So I'm happy you've actually checked
I'm surprised how many unused |
Lol, no worries. I happen to be available to review these at the moment. Good to see some, er, winter cleaning around this repo, heh. |
Thanks for the review @DeeDeeG! And yeah it's surprising how much junk is left over in this repo, so I'm more than happy to just delete it lol |
Alright, apologies to @DeeDeeG for the fact I just don't seem to stop making PPM PRs lol.
This PR should be the last one of the ones I've had semi ready to go, and implements the majority of the low hanging fruit flagged on codacy.
Thanks again to anyone able to review this one, and hopefully I'll calm down in this repo afterwards