Skip to content

Commit f57bd9f

Browse files
committed
[Fix] no-unknown-property support new precedence prop
Fixes #3827
1 parent 9668ee0 commit f57bd9f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
66

77
## Unreleased
88

9+
### Fixed
10+
* [`no-unknown-property`]: support `precedence` prop ([#3829][] @acusti)
11+
12+
[#3829]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3829
13+
914
## [7.36.1] - 2024.09.12
1015

1116
### Fixed

lib/rules/no-unknown-property.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ const DOM_PROPERTY_NAMES_ONE_WORD = [
234234
// OpenGraph meta tag attributes
235235
'property',
236236
// React specific attributes
237-
'ref', 'key', 'children',
237+
'ref', 'key', 'children', 'precedence',
238238
// Non-standard
239239
'results', 'security',
240240
// Video specific

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ ruleTester.run('no-unknown-property', rule, {
8989
{ code: '<div onPointerDown={this.onDown} onPointerUp={this.onUp} />' },
9090
{ code: '<input type="checkbox" defaultChecked={this.state.checkbox} />' },
9191
{ code: '<div onTouchStart={this.startAnimation} onTouchEnd={this.stopAnimation} onTouchCancel={this.cancel} onTouchMove={this.move} onMouseMoveCapture={this.capture} onTouchCancelCapture={this.log} />' },
92+
{ code: '<link precedence="medium" href="https://foo.bar" rel="canonical" />' },
9293
// Case ignored attributes, for `charset` discussion see https://github.com/jsx-eslint/eslint-plugin-react/pull/1863
9394
{ code: '<meta charset="utf-8" />;' },
9495
{ code: '<meta charSet="utf-8" />;' },

0 commit comments

Comments
 (0)