Skip to content

Commit e880213

Browse files
SevereCloudljharb
authored andcommitted
1 parent 36e791d commit e880213

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
2626
* [`jsx-newline`]: prevent a crash when `allowMultilines ([#3633][] @ljharb)
2727
* [`no-unknown-property`]: use a better regex to avoid a crash ([#3666][] @ljharb @SCH227)
2828
* [`prop-types`]: handle nested forwardRef + memo ([#3679][] @developer-bandi)
29+
* [`no-unknown-property`]: add `fetchPriority` ([#3697][] @SevereCloud)
2930

3031
### Changed
3132
* [Refactor] `propTypes`: extract type params to var ([#3634][] @HenryBrown0)
@@ -37,6 +38,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
3738
* [Docs] [`iframe-missing-sandbox`]: fix link to iframe attribute on mdn ([#3690][] @nnmrts)
3839
* [Docs] [`hook-use-state`]: fix an undefined variable ([#3626][] @chentsulin)
3940

41+
[#3697]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3697
4042
[#3690]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3690
4143
[#3680]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3680
4244
[#3679]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3679

lib/rules/no-unknown-property.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ const DOM_PROPERTY_NAMES_TWO_WORDS = [
257257
'onError', 'onFocus', 'onInput', 'onKeyDown', 'onKeyPress', 'onKeyUp', 'onLoad', 'onWheel', 'onDragOver',
258258
'onDragStart', 'onDrop', 'onMouseDown', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver',
259259
'onMouseUp', 'onPaste', 'onScroll', 'onSelect', 'onSubmit', 'onToggle', 'onTransitionEnd', 'radioGroup', 'readOnly', 'referrerPolicy',
260-
'rowSpan', 'srcDoc', 'srcLang', 'srcSet', 'useMap',
260+
'rowSpan', 'srcDoc', 'srcLang', 'srcSet', 'useMap', 'fetchPriority',
261261
// SVG attributes
262262
// See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
263263
'crossOrigin', 'accentHeight', 'alignmentBaseline', 'arabicForm', 'attributeName',

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ruleTester.run('no-unknown-property', rule, {
4646
{ code: '<div onMouseDown={this._onMouseDown}></div>;' },
4747
{ code: '<a href="someLink" download="foo">Read more</a>' },
4848
{ code: '<area download="foo" />' },
49-
{ code: '<img src="cat_keyboard.jpeg" alt="A cat sleeping on a keyboard" align="top" />' },
49+
{ code: '<img src="cat_keyboard.jpeg" alt="A cat sleeping on a keyboard" align="top" fetchPriority="high" />' },
5050
{ code: '<input type="password" required />' },
5151
{ code: '<input ref={this.input} type="radio" />' },
5252
{ code: '<input type="file" webkitdirectory="" />' },

0 commit comments

Comments
 (0)