-
Notifications
You must be signed in to change notification settings - Fork 80
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
docs(contributing): add a guide for checking of undefined
or null
#1093
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #1093 +/- ##
==========================================
+ Coverage 75.32% 75.99% +0.66%
==========================================
Files 80 80
Lines 16057 16060 +3
Branches 1503 1627 +124
==========================================
+ Hits 12095 12204 +109
+ Misses 3923 3824 -99
+ Partials 39 32 -7 ☔ View full report in Codecov by Sentry. |
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.
See just a couple of nits below, otherwise this looks very good and should be really helpful for contributors :)
CONTRIBUTING.md
Outdated
``` | ||
|
||
Instead of checking for both null and `undefiend` values (`if(arg !== undefined && arg !== null)`) the preferred solution is to use `!=` or `==` operator. Interestingly in JavaScript | ||
with ==, null and undefined are only equal to each other. Example: |
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.
I have issues to understand the part "are only equal to each other".
Don't you want so say the sentence without "only" ?
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.
Yeah, I think we can remove the only.
…r `null` Co-authored-by: Jan Romann <[email protected]>
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.
PR looks good!
I just wonder whether we should wait till we merge since we just checked 2 (out of the many) checkboxes for #1046
I'll merge as guide for future PR regarding the issue #1046 |
Following this comment, I thought it would have been good to have some references for future contributors.