Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Logic and style tweaks #67

Merged
merged 14 commits into from Jul 5, 2020
Merged

Logic and style tweaks #67

merged 14 commits into from Jul 5, 2020

Conversation

dxdc
Copy link
Contributor

@dxdc dxdc commented Jul 5, 2020

  • Fix .gitignore
  • Add linting to code and address all linting warnings/errors (including removing unused variables)
  • Simplify logic for doorTargetBias, doorCurrentBias

Copy link
Owner

@hjdhjd hjdhjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh. This is what having a MacBook with one of those blasted keyboards does. Thanks.

Copy link
Owner

@hjdhjd hjdhjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not comfortable with this one. Why force the most recent versions upon all of us if we aren’t ready for them? If there’s a good reason, all for it.

Copy link
Owner

@hjdhjd hjdhjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning this one up before I could get to it.

Copy link
Owner

@hjdhjd hjdhjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give me the argument for why single versus double quotes. Other than visual preference, I don’t see the need here. Thoughts?

Copy link
Owner

@hjdhjd hjdhjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer extra parens where possible for improved readability (line 159 in the base). I’m also not a fan of excess carriage returns (lines 163-169 in your patch). Lines 199+...too many spaces, My coding convention is two spaces (no tabs). I believe that has 3.

@dxdc
Copy link
Contributor Author

dxdc commented Jul 5, 2020

@hjdhjd you didn't comment on the individual lines so I don't know what you're referring to? will work on the ones I can though.

@hjdhjd
Copy link
Owner

hjdhjd commented Jul 5, 2020

I barely use half the features on github...so bear with my learning curve here as I figure out the social coding etiquette. 😄

@hjdhjd
Copy link
Owner

hjdhjd commented Jul 5, 2020

So the patches I’m good with: fixing the typos, updating from a series of ifs to a switch/case statement. The rest I have questions about. 😄

Can you break this up into multiple PRs, or, if you prefer to just update this PR and you can be patient with me while I sort out how to cherry pick updates, I’d appreciate it.

@dxdc
Copy link
Contributor Author

dxdc commented Jul 5, 2020

@hjdhjd made the following changes:

Give me the argument for why single versus double quotes.

  • It's a convention in languages that distinguish between these, so it's just a style preference. Used double quotes per single as you requested. For consistency, this was very mixed so you will see some single quotes changed to double.

prefer extra parens where possible for improved readability (line 159 in the base).

  • Fixed

I’m also not a fan of excess carriage returns (lines 163-169 in your patch).

  • Fixed

Lines 199+...too many spaces, My coding convention is two spaces (no tabs). I believe that has 3.

  • There were tabs in the latest commits which I fixed after rebasing against master. The spacing here should be correct now. The indenting had some issues in places before.

It may be easier for you to review the individual files and confirm:

Lastly,

I barely use half the features on github...so bear with my learning curve here as I figure out the social coding etiquette.

This is how to comment on individual lines. Click the "+" icon.
Screen Shot 2020-07-05 at 4 51 36 PM

@dxdc
Copy link
Contributor Author

dxdc commented Jul 5, 2020

I’m not comfortable with this one. Why force the most recent versions upon all of us if we aren’t ready for them? If there’s a good reason, all for it.

I'm assuming (?) this is referring to package.json. This doesn't force new versions, just checks against them. They are dev dependencies.

@hjdhjd
Copy link
Owner

hjdhjd commented Jul 5, 2020

I’m not comfortable with this one. Why force the most recent versions upon all of us if we aren’t ready for them? If there’s a good reason, all for it.

I'm assuming (?) this is referring to package.json. This doesn't force new versions, just checks against them. They are dev dependencies.

Yeah, but this dev, for instance, isn’t using node 14 on all his platforms. 😄

@hjdhjd
Copy link
Owner

hjdhjd commented Jul 5, 2020

@dxdc So here’s my question - if I merge this PR now, how can I see what are all the changes that are being merged in, since there are now multiple patches on top of patches here?

@dxdc
Copy link
Contributor Author

dxdc commented Jul 5, 2020

Yeah, but this dev, for instance, isn’t using node 14 on all his platforms.

Ah :) OK. Updated to the latest v10 package

So here’s my question - if I merge this PR now, how can I see what are all the changes that are being merged in, since there are now multiple patches on top of patches here?

For the diff, you can click on : https://github.com/hjdhjd/homebridge-myq2/pull/67/files
or here:
Screen Shot 2020-07-05 at 5 09 15 PM

@hjdhjd
Copy link
Owner

hjdhjd commented Jul 5, 2020

Sorry - brain fart. This happens when you get old. 😄

@hjdhjd
Copy link
Owner

hjdhjd commented Jul 5, 2020

Couple of more questions...so why reduce the import block as much as you chose to? I’m going off of the plugin template that the homebridge folks published.

Why swap out var for let...serves no functional purpose in the code?

@whreams
Copy link

whreams commented Jul 5, 2020 via email

@dxdc
Copy link
Contributor Author

dxdc commented Jul 5, 2020

Couple of more questions...so why reduce the import block as much as you chose to? I’m going off of the plugin template that the homebridge folks published.

You should only import what is used in that file. If not used, they should be removed.

Why swap out var for let...serves no functional purpose in the code?

https://medium.com/javascript-scene/javascript-es6-var-let-or-const-ba58b8dcde75

@hjdhjd
Copy link
Owner

hjdhjd commented Jul 5, 2020

Fair enough...and thanks, sincerely, for making this better @dxdc.

@hjdhjd
Copy link
Owner

hjdhjd commented Jul 5, 2020

@whreams Thanks...it’s a fun little side project. Really appreciate the support!

@hjdhjd hjdhjd merged commit c51f96f into hjdhjd:master Jul 5, 2020
@whreams
Copy link

whreams commented Jul 5, 2020 via email

@github-actions
Copy link

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related discussion, if needed.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants