Skip to content

Commit 0dc8c9d

Browse files
committed
[Fix] no-unknown-property: add viewBox on marker
Fixes #3416
1 parent 2cae464 commit 0dc8c9d

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CHANGELOG.md

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

66
## Unreleased
77

8+
### Fixed
9+
* [`no-unknown-property`]: add `viewBox` on `marker` ([#3416][] @ljharb)
10+
811
### Changed
912

1013
* [Meta] npmignore markdownlint config ([#3413][] @jorrit)
1114

15+
[#3416]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3416
1216
[#3413]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3413
1317

1418
## [7.31.7] - 2022.09.05

lib/rules/no-unknown-property.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const ATTRIBUTE_TAGS_MAP = {
6161
imageSizes: ['link'],
6262
imageSrcSet: ['link'],
6363
property: ['meta'],
64-
viewBox: ['svg'],
64+
viewBox: ['svg', 'marker'],
6565
as: ['link'],
6666
valign: ['tr', 'td', 'th', 'thead', 'tbody', 'tfoot', 'colgroup', 'col'], // deprecated, but known
6767
// Media events allowed only on audio and video tags, see https://github.com/facebook/react/blob/256aefbea1449869620fb26f6ec695536ab453f5/CHANGELOG.md#notable-enhancements

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ ruleTester.run('no-unknown-property', rule, {
119119
{ code: '<link as="audio">Audio content</link>' },
120120
{ code: '<video controlsList="nodownload" controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true}></video>' },
121121
{ code: '<audio controlsList="nodownload" controls={this.controls} crossOrigin="anonymous" disableRemotePlayback loop muted preload="none" src="something" onAbort={this.abort} onDurationChange={this.durationChange} onEmptied={this.emptied} onEnded={this.end} onError={this.error}></audio>' },
122+
{ code: '<marker id={markerId} viewBox="0 0 2 2" refX="1" refY="1" markerWidth="1" markerHeight="1" orient="auto" />' },
122123
{
123124
code: `
124125
<table>

0 commit comments

Comments
 (0)