Skip to content

Commit f3a277d

Browse files
committed
[Fix] add onMouseMoveCapture as valid react specific attribute
1 parent 4e2a128 commit f3a277d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/rules/no-unknown-property.js

+1
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ const DOM_PROPERTY_NAMES_TWO_WORDS = [
273273
'onAbort', 'onCanPlay', 'onCanPlayThrough', 'onDurationChange', 'onEmptied', 'onEncrypted', 'onEnded',
274274
'onLoadedData', 'onLoadedMetadata', 'onLoadStart', 'onPause', 'onPlay', 'onPlaying', 'onProgress', 'onRateChange',
275275
'onSeeked', 'onSeeking', 'onStalled', 'onSuspend', 'onTimeUpdate', 'onVolumeChange', 'onWaiting',
276+
'onMouseMoveCapture',
276277
// Video specific,
277278
'autoPictureInPicture', 'controlList', 'disablePictureInPicture', 'disableRemotePlayback',
278279

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ ruleTester.run('no-unknown-property', rule, {
6969
// React related attributes
7070
{ code: '<div onPointerDown={this.onDown} onPointerUp={this.onUp} />' },
7171
{ code: '<input type="checkbox" defaultChecked={this.state.checkbox} />' },
72-
{ code: '<div onTouchStart={this.startAnimation} onTouchEnd={this.stopAnimation} onTouchCancel={this.cancel} onTouchMove={this.move} />' },
72+
{ code: '<div onTouchStart={this.startAnimation} onTouchEnd={this.stopAnimation} onTouchCancel={this.cancel} onTouchMove={this.move} onMouseMoveCapture={this.capture} />' },
7373
// Case ignored attributes, for `charset` discussion see https://github.com/jsx-eslint/eslint-plugin-react/pull/1863
7474
{ code: '<meta charset="utf-8" />;' },
7575
{ code: '<meta charSet="utf-8" />;' },

0 commit comments

Comments
 (0)