Skip to content

Commit 5669fdb

Browse files
authored
Merge branch 'master' into no-unknown-property-picture-element
2 parents fbbd9a6 + 4be5632 commit 5669fdb

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ ruleTester.run('no-unknown-property', rule, {
114114
{ 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>' },
115115
{ code: '<line fill="pink" x1="0" y1="80" x2="100" y2="20"></line>' },
116116
{ code: '<link as="audio">Audio content</link>' },
117-
{ code: '<video controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true}></video>' },
118-
{ 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>' },
117+
{ code: '<video controlsList="nodownload" controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true}></video>' },
118+
{ 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>' },
119119

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

0 commit comments

Comments
 (0)