diff --git a/CHANGELOG.md b/CHANGELOG.md index fa6622f4b4..9f5c06affe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,14 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange ## Unreleased +### Fixed +* [`no-unknown-property`]: add `viewBox` on `marker` ([#3416][] @ljharb) + ### Changed * [Meta] npmignore markdownlint config ([#3413][] @jorrit) +[#3416]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3416 [#3413]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3413 ## [7.31.7] - 2022.09.05 diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index 35bb5b0824..695ae3b64a 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -61,7 +61,7 @@ const ATTRIBUTE_TAGS_MAP = { imageSizes: ['link'], imageSrcSet: ['link'], property: ['meta'], - viewBox: ['svg'], + viewBox: ['svg', 'marker'], as: ['link'], valign: ['tr', 'td', 'th', 'thead', 'tbody', 'tfoot', 'colgroup', 'col'], // deprecated, but known // Media events allowed only on audio and video tags, see https://github.com/facebook/react/blob/256aefbea1449869620fb26f6ec695536ab453f5/CHANGELOG.md#notable-enhancements diff --git a/tests/lib/rules/no-unknown-property.js b/tests/lib/rules/no-unknown-property.js index 12f294d70c..5e9ceba2fa 100644 --- a/tests/lib/rules/no-unknown-property.js +++ b/tests/lib/rules/no-unknown-property.js @@ -119,6 +119,7 @@ ruleTester.run('no-unknown-property', rule, { { code: 'Audio content' }, { code: '' }, { code: '' }, + { code: '' }, { code: `