-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add new dom-elements-style-is-object rule (Fixes #715) #755
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 new dom-elements-style-is-object rule (Fixes #715) #755
Conversation
@@ -72,6 +73,7 @@ module.exports = { | |||
} | |||
}, | |||
rules: { | |||
'react/dom-elements-style-is-object': 2, |
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 think we want to wait to enable this in the recommended configuration until the next major version bump, since doing so may end up breaking people's builds.
Great! Can you fix the issues raised by @lencioni? Also I'm not really a fan of the rule name: too long, should start by
|
It shouldn't have jsx since it should apply to createElement DOM elements too. |
Yea been hoping to get back to fixing up this rule. Hoping I can do it sometime this weekend. Yes the name is long but I think it accurately describes the rule. |
b0b6474
to
f5ac0ec
Compare
Checking that the style object values are stings has been pulled out and addressed the other comments. |
bb973bc
to
460b887
Compare
@ljharb A lot of current JSX rules can also apply to |
@yannickcr hm, I feel the opposite - that those rules should be renamed to not have jsx unless that's the only thing they apply to. |
362248b
to
8a9937c
Compare
So what is the decision on the name? Are we going with |
I don't care about the length; |
Sorry for the delay.
Yeah, in fact the I'm ok with |
8a9937c
to
ff6ab04
Compare
Renamed the rule. Let me know if there is anything else left to do. |
Merged. Thank you! |
does not work if i'm using |
Fixes #715