From 4be5632101f52535f33238a723723ebb7ff906ef Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 5 Sep 2022 00:00:39 -0700 Subject: [PATCH] [Fix] `no-unknown-property`: `controlsList`, not `controlList` Fixes #3397 --- CHANGELOG.md | 2 ++ lib/rules/no-unknown-property.js | 2 +- tests/lib/rules/no-unknown-property.js | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03915d6f3b..b3e3aac813 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange * [`no-unknown-property`]: avoid warning on `fbt` nodes entirely ([#3391][] @ljharb) * [`no-unknown-property`]: add `download` property support for `a` and `area` ([#3394][] @HJain13) * [`no-unknown-property`]: allow `webkitAllowFullScreen` and `mozAllowFullScreen` ([#3396][] @ljharb) +* [`no-unknown-property`]: `controlsList`, not `controlList` ([#3397][] @ljharb) +[#3397]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3397 [#3396]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3396 [#3394]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3394 [#3391]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3391 diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index adb2b77f0c..57d08f87a8 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -90,7 +90,7 @@ const ATTRIBUTE_TAGS_MAP = { // Video related attributes autoPictureInPicture: ['video'], controls: ['audio', 'video'], - controlList: ['video'], + controlsList: ['audio', 'video'], disablePictureInPicture: ['video'], disableRemotePlayback: ['audio', 'video'], loop: ['audio', 'video'], diff --git a/tests/lib/rules/no-unknown-property.js b/tests/lib/rules/no-unknown-property.js index 3025d20d74..38d42118bc 100644 --- a/tests/lib/rules/no-unknown-property.js +++ b/tests/lib/rules/no-unknown-property.js @@ -112,8 +112,8 @@ ruleTester.run('no-unknown-property', rule, { { code: '' }, { code: '' }, { code: 'Audio content' }, - { code: '' }, - { code: '' }, + { code: '' }, + { code: '' }, // fbt { code: ';' },