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
Fix invalid option warnings for strings in *-list
#5934
Conversation
*/ | ||
module.exports = function validateObjectWithArrayProps(validator) { | ||
module.exports = function validateObjectWithArrayProps(...validators) { |
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.
[note] I've changed the argument type for a more straightforward implementation. However, I think it's safe this utility has not been exposed.
757804d
to
9fa46f2
Compare
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.
This is stellar work, thank you!
The changes to the validate utility are nice, as is the use of the new flattenArray
utility in the rules.
What should the changelog entry be?
"Fixed: *-list
invalid option warnings for strings"
I agree with your idea. 👍🏼 |
Let's merge and I'll put out a patch release. |
validateObjectWithArrayProps()
utility*-list
Changelog updated:
|
Closes #5933
This pull request does:
validateObjectWithArrayProps()
utility to accept also a single value not only an array. E.g.validateObjectWithArrayProps()