Skip to content

Commit 072d8e1

Browse files
committed
[Fix] jsx-eslint#3397 accept controlsList
1 parent 7ba7ec4 commit 072d8e1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/rules/no-unknown-property.js

+2-2
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: ['video'],
9494
disablePictureInPicture: ['video'],
9595
disableRemotePlayback: ['audio', 'video'],
9696
loop: ['audio', 'video'],
@@ -277,7 +277,7 @@ const DOM_PROPERTY_NAMES_TWO_WORDS = [
277277
'onSeeked', 'onSeeking', 'onStalled', 'onSuspend', 'onTimeUpdate', 'onVolumeChange', 'onWaiting',
278278
'onMouseMoveCapture',
279279
// Video specific,
280-
'autoPictureInPicture', 'controlList', 'disablePictureInPicture', 'disableRemotePlayback',
280+
'autoPictureInPicture', 'controlsList', 'disablePictureInPicture', 'disableRemotePlayback',
281281
];
282282

283283
const DOM_PROPERTIES_IGNORE_CASE = ['charset', 'allowFullScreen', 'webkitAllowFullScreen', 'mozAllowFullScreen'];

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ 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>' },
115+
{ code: '<video controls={this.controls} controlsList={this.controlsList} loop={true} muted={false} src={this.videoSrc} playsInline={true}></video>' },
116116
{ 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>' },
117117

118118
// fbt

0 commit comments

Comments
 (0)