Skip to content
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

Merged
merged 4 commits into from
Sep 22, 2023

Conversation

relu91
Copy link
Member

@relu91 relu91 commented Sep 21, 2023

Following this comment, I thought it would have been good to have some references for future contributors.

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.66% 🎉

Comparison is base (95ea950) 75.32% compared to head (20387d5) 75.99%.
Report is 7 commits behind head on master.

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     

see 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@JKRhb JKRhb left a 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 Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
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:
Copy link
Member

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" ?

Copy link
Member Author

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.

CONTRIBUTING.md Outdated Show resolved Hide resolved
Copy link
Member

@danielpeintner danielpeintner left a 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

@relu91
Copy link
Member Author

relu91 commented Sep 22, 2023

I'll merge as guide for future PR regarding the issue #1046

@relu91 relu91 merged commit bd247a0 into master Sep 22, 2023
12 checks passed
@egekorkan egekorkan deleted the relu91-docs-1 branch March 18, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants