Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] no-unknown-property: add fill for <marker> #3525

Merged
merged 1 commit into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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