Skip to content

Commit bc33ad7

Browse files
sjarvaljharb
authored andcommitted
[Fix] no-unknown-property: add onMouseMoveCapture as valid react-specific attribute
1 parent 38572e8 commit bc33ad7

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
1111
* [`no-unknown-property`]: add more audio/video attributes ([#3390][] @sjarva)
1212
* [`no-unknown-property`]: move allowfullscreen to case ignored attributes ([#3390][] @sjarva)
1313
* [`no-unknown-property`]: fill works on line, mask, and use elements ([#3390][] @sjarva)
14+
* [`no-unknown-property`]: add onMouseMoveCapture as valid react-specific attribute ([#3390][] @sjarva)
1415

1516
[#3390]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3390
1617
[#3388]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3388

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)