Skip to content

Commit

Permalink
[Fix] no-unknown-property: add fill for <marker>
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-koran authored and ljharb committed Jan 24, 2023
1 parent 4523e73 commit 14e315a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
### Fixed
* configs: restore `parserOptions` in legacy configs ([#3523][] @ljharb)
* [`jsx-no-constructed-context-values`], [`jsx-no-useless-fragment`]: add a rule schema (@ljharb)
( [`no-unknown-property`]: add `fill` for `<marker>` ([#3525][] @alexey-koran)

[#3525]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3525
[#3520]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3523

## [7.32.1] - 2023.01.16
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-unknown-property.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const ATTRIBUTE_TAGS_MAP = {
'ellipse',
'g',
'line',
'marker',
'mask',
'path',
'polygon',
Expand Down
3 changes: 2 additions & 1 deletion tests/lib/rules/no-unknown-property.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ ruleTester.run('no-unknown-property', rule, {
{ code: '<view id="one" viewBox="0 0 100 100" />' },
{ code: '<hr align="top" />' },
{ code: '<applet align="top" />' },
{ code: '<marker fill="#000" />' },
{ code: '<dialog onClose={handler} open id="dialog" returnValue="something" onCancel={handler2} />' },
{
code: `
Expand Down Expand Up @@ -471,7 +472,7 @@ ruleTester.run('no-unknown-property', rule, {
data: {
name: 'fill',
tagName: 'div',
allowedTags: 'altGlyph, circle, ellipse, g, line, mask, path, polygon, polyline, rect, svg, text, textPath, tref, tspan, use, animate, animateColor, animateMotion, animateTransform, set',
allowedTags: 'altGlyph, circle, ellipse, g, line, marker, mask, path, polygon, polyline, rect, svg, text, textPath, tref, tspan, use, animate, animateColor, animateMotion, animateTransform, set',
},
},
],
Expand Down

0 comments on commit 14e315a

Please sign in to comment.