Skip to content

Commit 14e315a

Browse files
alexey-koranljharb
authored andcommitted
[Fix] no-unknown-property: add fill for <marker>
1 parent 4523e73 commit 14e315a

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
88
### Fixed
99
* configs: restore `parserOptions` in legacy configs ([#3523][] @ljharb)
1010
* [`jsx-no-constructed-context-values`], [`jsx-no-useless-fragment`]: add a rule schema (@ljharb)
11+
( [`no-unknown-property`]: add `fill` for `<marker>` ([#3525][] @alexey-koran)
1112

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

1416
## [7.32.1] - 2023.01.16

lib/rules/no-unknown-property.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const ATTRIBUTE_TAGS_MAP = {
4242
'ellipse',
4343
'g',
4444
'line',
45+
'marker',
4546
'mask',
4647
'path',
4748
'polygon',

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ ruleTester.run('no-unknown-property', rule, {
131131
{ code: '<view id="one" viewBox="0 0 100 100" />' },
132132
{ code: '<hr align="top" />' },
133133
{ code: '<applet align="top" />' },
134+
{ code: '<marker fill="#000" />' },
134135
{ code: '<dialog onClose={handler} open id="dialog" returnValue="something" onCancel={handler2} />' },
135136
{
136137
code: `
@@ -471,7 +472,7 @@ ruleTester.run('no-unknown-property', rule, {
471472
data: {
472473
name: 'fill',
473474
tagName: 'div',
474-
allowedTags: 'altGlyph, circle, ellipse, g, line, mask, path, polygon, polyline, rect, svg, text, textPath, tref, tspan, use, animate, animateColor, animateMotion, animateTransform, set',
475+
allowedTags: 'altGlyph, circle, ellipse, g, line, marker, mask, path, polygon, polyline, rect, svg, text, textPath, tref, tspan, use, animate, animateColor, animateMotion, animateTransform, set',
475476
},
476477
},
477478
],

0 commit comments

Comments
 (0)