Skip to content

Commit

Permalink
[Fix] jsx-eslint#3397 accept controlsList
Browse files Browse the repository at this point in the history
  • Loading branch information
sjarva committed Sep 5, 2022
1 parent 7ba7ec4 commit 072d8e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/rules/no-unknown-property.js
Expand Up @@ -90,7 +90,7 @@ const ATTRIBUTE_TAGS_MAP = {
// Video related attributes
autoPictureInPicture: ['video'],
controls: ['audio', 'video'],
controlList: ['video'],
controlsList: ['video'],
disablePictureInPicture: ['video'],
disableRemotePlayback: ['audio', 'video'],
loop: ['audio', 'video'],
Expand Down Expand Up @@ -277,7 +277,7 @@ const DOM_PROPERTY_NAMES_TWO_WORDS = [
'onSeeked', 'onSeeking', 'onStalled', 'onSuspend', 'onTimeUpdate', 'onVolumeChange', 'onWaiting',
'onMouseMoveCapture',
// Video specific,
'autoPictureInPicture', 'controlList', 'disablePictureInPicture', 'disableRemotePlayback',
'autoPictureInPicture', 'controlsList', 'disablePictureInPicture', 'disableRemotePlayback',
];

const DOM_PROPERTIES_IGNORE_CASE = ['charset', 'allowFullScreen', 'webkitAllowFullScreen', 'mozAllowFullScreen'];
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rules/no-unknown-property.js
Expand Up @@ -112,7 +112,7 @@ ruleTester.run('no-unknown-property', rule, {
{ 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>' },
{ code: '<line fill="pink" x1="0" y1="80" x2="100" y2="20"></line>' },
{ code: '<link as="audio">Audio content</link>' },
{ code: '<video controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true}></video>' },
{ code: '<video controls={this.controls} controlsList={this.controlsList} loop={true} muted={false} src={this.videoSrc} playsInline={true}></video>' },
{ 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>' },

// fbt
Expand Down

0 comments on commit 072d8e1

Please sign in to comment.