-
-
Notifications
You must be signed in to change notification settings - Fork 930
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: improve docs for faker.number.float #2607
docs: improve docs for faker.number.float #2607
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #2607 +/- ##
=======================================
Coverage 99.57% 99.57%
=======================================
Files 2807 2807
Lines 250448 250441 -7
Branches 1148 1151 +3
=======================================
+ Hits 249374 249377 +3
+ Misses 1046 1036 -10
Partials 28 28
|
Co-authored-by: ST-DDT <[email protected]>
Co-authored-by: ST-DDT <[email protected]>
General question: Do we want to write JSDocs in one line? In our Markdown files we generally break after certain keypoints (end of sentence, punctuation, reaching character line limit). I was having trouble reading these long description lines on my phone. Might not be that hard to read on a bigger screen, but I generally prefer breaking the line, at least after the end of a sentence. I'm I the only one? What's your take on this? |
Thanks for raising this, now I feel confirmed as I encountered this as well but did not say anything |
Ideally we could have a lint or prettier rule to do this automatically as I'm usually on a desktop with word wrap enabled when editing, so it's not something I typically think about. |
Either eslint-plugin-jsdoc has something for this already and needs to be configured, or as I suggest: do not use the IDE Editor Panel but hover over the function and investigate how it is rendered in the IDE tooltip. |
single newlines in Markdown have no effect on how the text is rendered. So this is only important when viewing the raw markdown. |
No, what we mean is the preference of:
instead of
Please recognize the blank line between the sentences, because this results in a real line break in the rendered tooltip. |
its not terribly consistent at the moment. Most descriptions of methods are very terse. Where there are multiple sentences, sometimes linebreaks are used and sometimes they are not https://fakerjs.dev/api/internet.html#username |
You can decide, I approved already 🤷 |
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'll approve as well. We should have some standards/rules to follow regarding comment format. Since we don't have that, I'll not block this PR with my question.
cleanup of docs after #1855 and #2564
Make it clearer that precision is a deprecated version of multipleOf, and that you should only pass one of {precision, multipleOf, fractionDigits}. Fix an example. Move information about inclusive/exclusive to the min/max parameters.