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
change allowTransparency to allowtransparency #1538
Conversation
lib/rules/no-unknown-property.js
Outdated
@@ -108,7 +108,7 @@ const SVGDOM_ATTRIBUTE_NAMES = { | |||
|
|||
const DOM_PROPERTY_NAMES = [ | |||
// Standard | |||
'acceptCharset', 'accessKey', 'allowFullScreen', 'allowTransparency', 'autoComplete', 'autoFocus', 'autoPlay', | |||
'acceptCharset', 'accessKey', 'allowFullScreen', 'allowtransparency', 'autoComplete', 'autoFocus', 'autoPlay', |
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.
Did react remove support for this property? I’m reasonably sure it was supported at the time this list was created. What version dropped support for it?
The lowercase one is just a generic custom property name; there’s no need to include it in the list at 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.
Looks like it was removed in facebook/react#10823, which was released in 16.1.0. It must have been missed when making the release notes.
@@ -108,7 +108,7 @@ const SVGDOM_ATTRIBUTE_NAMES = { | |||
|
|||
const DOM_PROPERTY_NAMES = [ | |||
// Standard | |||
'acceptCharset', 'accessKey', 'allowFullScreen', 'allowTransparency', 'autoComplete', 'autoFocus', 'autoPlay', |
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.
In that case, it should be present unless the React version declared in the settings is 16.1+.
Can you completely remove it? That's what React did. This attribute only works for IE8 and lower. React stopped supporting them more than a year ago. |
We should be supporting what is, not what the documentation claims things are. It seems like the attribute arrives in the HTML in every browser prior to React 16.1; whether it has functionality or not isn't particularly relevant. |
I rebased this and added the version logic. |
Changed
allowTransparency
toallowtransparency
to account for the following react error:Warning: React does not recognize the
allowTransparency
prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercaseallowtransparency
instead. If you accidentally passed it from a parent component, remove it from the DOM element.react -
16.1.1
react-dom -
16.1.1