-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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 missing single-word attributes to property warning list #10495
Conversation
color: 'color', | ||
results: 'results', | ||
security: 'security', | ||
unselectable: 'unselectable', |
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.
Why do we start from A three times? Are these generated from different whitelists? In this case should there be a comment explaining grouping
Or we could sort them all.
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.
Yes. It's a combination of the HTML Property Config and SVG Property Config, which where ultimately just blended into the same list inside of DOMProperty.properties
Wrestled with some editor-fu, but I've alphabetized these while still clumping together aliases.
Accepted with nit (unclear sort order). Let's leave to @flarnie for second review. |
Mind adding a test? A simple one is fine. |
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.
loveit
If we later add an attribute to whitelist should we also add it to this DEV whitelist? |
Yes. We could seed the list with existing property names from the whitelist, but i thought this was much simpler, even if duplicative |
Worth adding a comment to both maybe to make this clearer. |
Sure. Done!
…On Fri, Aug 18, 2017, 6:48 PM Dan Abramov ***@***.***> wrote:
Worth adding a comment to both maybe to make this clearer.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10495 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAkEOFQZe-7cTrJa_RM9XvXAVQIjPQYpks5sZhS_gaJpZM4O8DTR>
.
|
Thanks for doing this! I liked the helpful comments - I think this makes sense. I'm going to do my testing work on top of this branch, assuming you will merge whenever you get a chance. |
I never added the all-lowercase words to the list of attribute casings to warn about. @flarnie caught this when you pass something like
SiZe
. This is a known HTML attribute. We need to warn users that they should specify this property assize
.Basically I just ran this over the 15.6.1 whitelist:
And pasted it over to the list.