Skip to content

Commit

Permalink
[Fix] no-unknown-property support new precedence prop
Browse files Browse the repository at this point in the history
  • Loading branch information
acusti committed Sep 19, 2024
1 parent 9668ee0 commit f57bd9f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange

## Unreleased

### Fixed
* [`no-unknown-property`]: support `precedence` prop ([#3829][] @acusti)

[#3829]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3829

## [7.36.1] - 2024.09.12

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-unknown-property.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const DOM_PROPERTY_NAMES_ONE_WORD = [
// OpenGraph meta tag attributes
'property',
// React specific attributes
'ref', 'key', 'children',
'ref', 'key', 'children', 'precedence',
// Non-standard
'results', 'security',
// Video specific
Expand Down
1 change: 1 addition & 0 deletions tests/lib/rules/no-unknown-property.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ ruleTester.run('no-unknown-property', rule, {
{ code: '<div onPointerDown={this.onDown} onPointerUp={this.onUp} />' },
{ code: '<input type="checkbox" defaultChecked={this.state.checkbox} />' },
{ code: '<div onTouchStart={this.startAnimation} onTouchEnd={this.stopAnimation} onTouchCancel={this.cancel} onTouchMove={this.move} onMouseMoveCapture={this.capture} onTouchCancelCapture={this.log} />' },
{ code: '<link precedence="medium" href="https://foo.bar" rel="canonical" />' },
// Case ignored attributes, for `charset` discussion see https://github.com/jsx-eslint/eslint-plugin-react/pull/1863
{ code: '<meta charset="utf-8" />;' },
{ code: '<meta charSet="utf-8" />;' },
Expand Down

0 comments on commit f57bd9f

Please sign in to comment.