Skip to content

Commit

Permalink
no-unknown-property: allow allowFullScreen on iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Oct 10, 2022
1 parent 17858be commit 1093a96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/rules/no-unknown-property.js
Expand Up @@ -104,9 +104,9 @@ const ATTRIBUTE_TAGS_MAP = {
loop: ['audio', 'video'],
muted: ['audio', 'video'],
playsInline: ['video'],
allowFullScreen: ['video'],
webkitAllowFullScreen: ['video'],
mozAllowFullScreen: ['video'],
allowFullScreen: ['iframe', 'video'],
webkitAllowFullScreen: ['iframe', 'video'],
mozAllowFullScreen: ['iframe', 'video'],
poster: ['video'],
preload: ['audio', 'video'],
scrolling: ['iframe'],
Expand Down
3 changes: 2 additions & 1 deletion tests/lib/rules/no-unknown-property.js
Expand Up @@ -70,6 +70,7 @@ ruleTester.run('no-unknown-property', rule, {
{ code: '<link rel="preload" as="image" href="someHref" imageSrcSet="someImageSrcSet" imageSizes="someImageSizes" />' },
{ code: '<object onLoad={bar} />' },
{ code: '<video allowFullScreen webkitAllowFullScreen mozAllowFullScreen />' },
{ code: '<iframe allowFullScreen webkitAllowFullScreen mozAllowFullScreen />' },
{ code: '<table border="1" />' },
{ code: '<th abbr="abbr" />' },
{ code: '<td abbr="abbr" />' },
Expand Down Expand Up @@ -513,7 +514,7 @@ ruleTester.run('no-unknown-property', rule, {
data: {
name: 'allowFullScreen',
tagName: 'div',
allowedTags: 'video',
allowedTags: 'iframe, video',
},
},
],
Expand Down

0 comments on commit 1093a96

Please sign in to comment.