From 74bfbc14ef8d2435f778734430fdcfe57825cdc1 Mon Sep 17 00:00:00 2001 From: Almeida Date: Mon, 10 Oct 2022 12:16:14 +0000 Subject: [PATCH] [Fix] `no-unknown-property`: allow `allowFullScreen` on `iframe` (#3455) Fixes #3456. --- CHANGELOG.md | 5 +++++ lib/rules/no-unknown-property.js | 6 +++--- tests/lib/rules/no-unknown-property.js | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7545fa2e9..32ce430585 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange ## Unreleased +### Fixed +* [`no-unknown-property`]: allow `allowFullScreen` on `iframe` ([#3455][] @almeidx) + +[#3455]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3455 + ## [7.31.9] - 2022.10.09 ### Fixed diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index 7c8b66ac24..83fa695bec 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -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'], diff --git a/tests/lib/rules/no-unknown-property.js b/tests/lib/rules/no-unknown-property.js index 2fbc264185..86caae5437 100644 --- a/tests/lib/rules/no-unknown-property.js +++ b/tests/lib/rules/no-unknown-property.js @@ -70,6 +70,7 @@ ruleTester.run('no-unknown-property', rule, { { code: '' }, { code: '' }, { code: '