Skip to content

Commit 4be5632

Browse files
committed
[Fix] no-unknown-property: controlsList, not controlList
Fixes #3397
1 parent 7ba7ec4 commit 4be5632

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
99
* [`no-unknown-property`]: avoid warning on `fbt` nodes entirely ([#3391][] @ljharb)
1010
* [`no-unknown-property`]: add `download` property support for `a` and `area` ([#3394][] @HJain13)
1111
* [`no-unknown-property`]: allow `webkitAllowFullScreen` and `mozAllowFullScreen` ([#3396][] @ljharb)
12+
* [`no-unknown-property`]: `controlsList`, not `controlList` ([#3397][] @ljharb)
1213

14+
[#3397]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3397
1315
[#3396]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3396
1416
[#3394]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3394
1517
[#3391]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3391

lib/rules/no-unknown-property.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const ATTRIBUTE_TAGS_MAP = {
9090
// Video related attributes
9191
autoPictureInPicture: ['video'],
9292
controls: ['audio', 'video'],
93-
controlList: ['video'],
93+
controlsList: ['audio', 'video'],
9494
disablePictureInPicture: ['video'],
9595
disableRemotePlayback: ['audio', 'video'],
9696
loop: ['audio', 'video'],

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ ruleTester.run('no-unknown-property', rule, {
112112
{ code: '<path fill="pink" d="M 10,30 A 20,20 0,0,1 50,30 A 20,20 0,0,1 90,30 Q 90,60 50,90 Q 10,60 10,30 z"></path>' },
113113
{ code: '<line fill="pink" x1="0" y1="80" x2="100" y2="20"></line>' },
114114
{ code: '<link as="audio">Audio content</link>' },
115-
{ code: '<video controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true}></video>' },
116-
{ code: '<audio controls={this.controls} crossOrigin="anonymous" disableRemotePlayback loop muted preload="none" src="something" onAbort={this.abort} onDurationChange={this.durationChange} onEmptied={this.emptied} onEnded={this.end} onError={this.error}></audio>' },
115+
{ code: '<video controlsList="nodownload" controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true}></video>' },
116+
{ code: '<audio controlsList="nodownload" controls={this.controls} crossOrigin="anonymous" disableRemotePlayback loop muted preload="none" src="something" onAbort={this.abort} onDurationChange={this.durationChange} onEmptied={this.emptied} onEnded={this.end} onError={this.error}></audio>' },
117117

118118
// fbt
119119
{ code: '<fbt desc="foo" doNotExtract />;' },

0 commit comments

Comments
 (0)