diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d5324d10b..124d7e0aa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,11 +11,13 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange * [`no-unknown-property`]: allow `onLoad` on `` ([#3415][] @OleksiiKachan) * [`no-multi-comp`]: do not detect a function property returning only null as a component ([#3412][] @ljharb) * [`no-unknown-property`]: allow `abbr` on `` and `` ([#3419][] @OleksiiKachan) +* [`no-unknown-property`]: add `viewBox` for `pattern`, `symbol`, `view` ([#3424][] @MNBuyskih) ### Changed -* [Meta] npmignore markdownlint config ([#3413][] @jorrit) +* [meta] npmignore markdownlint config ([#3413][] @jorrit) +[#3424]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3424 [#3419]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3419 [#3416]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3416 [#3415]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3415 diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index 92f0257fe3..1cd76656e4 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -63,7 +63,7 @@ const ATTRIBUTE_TAGS_MAP = { imageSizes: ['link'], imageSrcSet: ['link'], property: ['meta'], - viewBox: ['svg', 'marker'], + viewBox: ['marker', 'pattern', 'svg', 'symbol', 'view'], as: ['link'], valign: ['tr', 'td', 'th', 'thead', 'tbody', 'tfoot', 'colgroup', 'col'], // deprecated, but known noModule: ['script'], diff --git a/tests/lib/rules/no-unknown-property.js b/tests/lib/rules/no-unknown-property.js index 0006041371..35b012bfff 100644 --- a/tests/lib/rules/no-unknown-property.js +++ b/tests/lib/rules/no-unknown-property.js @@ -123,6 +123,9 @@ ruleTester.run('no-unknown-property', rule, { { code: '' }, { code: '' }, { code: '' }, + { code: '' }, + { code: '' }, + { code: '' }, { code: `