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
Add declaration-property-max-values #5920
Conversation
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.
@mattxwang Thank you for creating this pull request! I think the implementation is in the right direction. 👍🏼
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.
@mattxwang Looking good so far!
I've requested a few changes in addition to @ybiquitous'.
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Applies suggestions from code review: - removes invalid CSS from docs and test cases - removes redundant docs entries - uses `a` for all selectors - writes a new helper "isValueNode" to cover word, function, string value types - adds new test case for css variable
…operty-max-values
4701a2f
to
7955ad1
Compare
Thanks for the in-depth feedback @jeddy3 and @ybiquitous, it's much appreciated - I still have a lot to learn in terms of the codebase and best practices. In general, I think I've addressed each point of feedback. I did have a chance to implement And, anything else I should be mindful of? |
@mattxwang I think your implementation of |
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.
Thanks for making the changes! Looking good.
In addition to @ybiquitous' suggestion, just one more minor request from me
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Thanks for the suggestions @ybiquitous, didn't realize that we'd get better typing by importing from @jeddy3, I may be missing something, but what was your requested change? I don't see anything attached to your "requested changes" dialog box. |
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.
@mattxwang Thank you for addressing the reviews. Almost good. 👍🏼
I've left more trivial suggestions and one question.
Moves `validateOptions` outside of `walkDecls`, better type annotation style! Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
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.
@mattxwang Thank you for implementing the excellent rule. LGTM 👍🏼
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.
@jeddy3, I may be missing something, but what was your requested change? I don't see anything attached to your "requested changes" dialog box.
That's weird. It seems it fell into the ether.
I've readded it.
Moves external require to top of require list Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Completely missed one of the requested changes, my fault! Should have addressed all the comments - @jeddy3 let me know what you think! |
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.
Thanks for making the changes. I think the tests and readme work better now.
LGTM.
|
Closes #5435, related to #3968.
As suggested by @jeddy3, I've scaffolded this off of
declaration-property-value-allowed-list
. I've also implemented a new util,validateObjectWithProps()
, and written some tests.This is my first time creating an entirely new rule, so I have three things I'd like to get some feedback on:
validateOptions
utility function. How should I use it here, if at all?word
nodes after running the value through the value parser. Is this the correct approach?