-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: format object properties with types #59
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #59 +/- ##
==========================================
- Coverage 98.72% 98.13% -0.59%
==========================================
Files 5 5
Lines 550 645 +95
Branches 250 268 +18
==========================================
+ Hits 543 633 +90
- Misses 7 12 +5
Continue to review full report at Codecov.
|
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.
Let's add test for multiple types
, output should be like <key>: string | integer
.
For objects we don't expand them, right?
Yes objects and arrays are not expanded |
Multiple types could be only with |
so @evilebottnawi what we need in this PR still? Tests on |
@vankop all is good, i will review deeply this in near future |
/cc @vankop need rebase, also i think we should improve output using |
@evilebottnawi you have any ideas how to do it better? When I did this I was thinking about it, but did not realized how to do it better, since it depends totally on terminal window size + font type/size. Approach when we rely only on amount of properties also fails because of glyph sizes |
@vankop the good question, maybe we can solve this in other PR, i think packages like |
# Conflicts: # src/ValidationError.js # test/__snapshots__/index.test.js.snap
… into more-info-for-object-properties
/cc @evilebottnawi Ready to review
I think this really important, I will take a look in |
Also interesting question is - do we need sort properties alphabetically? |
@vankop it is very old 😄 what we will do with it? close or rebase? 😄 |
I could merge main to make this relevant again |
@vankop Yeah, let's do it |
This PR contains a:
Motivation / Use-Case
#42
2nd proposal
Breaking Changes
no
Additional Info
Looks like for array and object we can skip formatting type.