diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d4d736039..9e89710802 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange * [`jsx-newline`]: prevent a crash when `allowMultilines ([#3633][] @ljharb) * [`no-unknown-property`]: use a better regex to avoid a crash ([#3666][] @ljharb @SCH227) * [`prop-types`]: handle nested forwardRef + memo ([#3679][] @developer-bandi) +* [`no-unknown-property`]: add `fetchPriority` ([#3697][] @SevereCloud) ### Changed * [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 * [Docs] [`iframe-missing-sandbox`]: fix link to iframe attribute on mdn ([#3690][] @nnmrts) * [Docs] [`hook-use-state`]: fix an undefined variable ([#3626][] @chentsulin) +[#3697]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3697 [#3690]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3690 [#3680]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3680 [#3679]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3679 diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index 2e77f2898b..ec913e1fca 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -257,7 +257,7 @@ const DOM_PROPERTY_NAMES_TWO_WORDS = [ 'onError', 'onFocus', 'onInput', 'onKeyDown', 'onKeyPress', 'onKeyUp', 'onLoad', 'onWheel', 'onDragOver', 'onDragStart', 'onDrop', 'onMouseDown', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onPaste', 'onScroll', 'onSelect', 'onSubmit', 'onToggle', 'onTransitionEnd', 'radioGroup', 'readOnly', 'referrerPolicy', - 'rowSpan', 'srcDoc', 'srcLang', 'srcSet', 'useMap', + 'rowSpan', 'srcDoc', 'srcLang', 'srcSet', 'useMap', 'fetchPriority', // SVG attributes // See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute 'crossOrigin', 'accentHeight', 'alignmentBaseline', 'arabicForm', 'attributeName', diff --git a/tests/lib/rules/no-unknown-property.js b/tests/lib/rules/no-unknown-property.js index 3c20feebd4..89624d540a 100644 --- a/tests/lib/rules/no-unknown-property.js +++ b/tests/lib/rules/no-unknown-property.js @@ -46,7 +46,7 @@ ruleTester.run('no-unknown-property', rule, { { code: '
;' }, { code: 'Read more' }, { code: '' }, - { code: 'A cat sleeping on a keyboard' }, + { code: 'A cat sleeping on a keyboard' }, { code: '' }, { code: '' }, { code: '' },