Skip to content

Commit 74bfbc1

Browse files
almeidxljharb
authored andcommitted
[Fix] no-unknown-property: allow allowFullScreen on iframe (#3455)
Fixes #3456.
1 parent 96062ea commit 74bfbc1

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
55

66
## Unreleased
77

8+
### Fixed
9+
* [`no-unknown-property`]: allow `allowFullScreen` on `iframe` ([#3455][] @almeidx)
10+
11+
[#3455]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3455
12+
813
## [7.31.9] - 2022.10.09
914

1015
### Fixed

lib/rules/no-unknown-property.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ const ATTRIBUTE_TAGS_MAP = {
104104
loop: ['audio', 'video'],
105105
muted: ['audio', 'video'],
106106
playsInline: ['video'],
107-
allowFullScreen: ['video'],
108-
webkitAllowFullScreen: ['video'],
109-
mozAllowFullScreen: ['video'],
107+
allowFullScreen: ['iframe', 'video'],
108+
webkitAllowFullScreen: ['iframe', 'video'],
109+
mozAllowFullScreen: ['iframe', 'video'],
110110
poster: ['video'],
111111
preload: ['audio', 'video'],
112112
scrolling: ['iframe'],

tests/lib/rules/no-unknown-property.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ ruleTester.run('no-unknown-property', rule, {
7070
{ code: '<link rel="preload" as="image" href="someHref" imageSrcSet="someImageSrcSet" imageSizes="someImageSizes" />' },
7171
{ code: '<object onLoad={bar} />' },
7272
{ code: '<video allowFullScreen webkitAllowFullScreen mozAllowFullScreen />' },
73+
{ code: '<iframe allowFullScreen webkitAllowFullScreen mozAllowFullScreen />' },
7374
{ code: '<table border="1" />' },
7475
{ code: '<th abbr="abbr" />' },
7576
{ code: '<td abbr="abbr" />' },
@@ -513,7 +514,7 @@ ruleTester.run('no-unknown-property', rule, {
513514
data: {
514515
name: 'allowFullScreen',
515516
tagName: 'div',
516-
allowedTags: 'video',
517+
allowedTags: 'iframe, video',
517518
},
518519
},
519520
],

0 commit comments

Comments
 (0)