diff --git a/CHANGELOG.md b/CHANGELOG.md index 124d7e0aa1..53c0618128 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,11 +12,13 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange * [`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) +* [`no-unknown-property`]: add `align` on all the tags that support it ([#3425][] @ljharb) ### Changed * [meta] npmignore markdownlint config ([#3413][] @jorrit) +[#3425]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3425 [#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 diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index 1cd76656e4..af64a33469 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -65,6 +65,7 @@ const ATTRIBUTE_TAGS_MAP = { property: ['meta'], viewBox: ['marker', 'pattern', 'svg', 'symbol', 'view'], as: ['link'], + align: ['applet', 'caption', 'col', 'colgroup', 'hr', 'iframe', 'img', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr'], // deprecated, but known valign: ['tr', 'td', 'th', 'thead', 'tbody', 'tfoot', 'colgroup', 'col'], // deprecated, but known noModule: ['script'], // 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 35b012bfff..5fafd46a41 100644 --- a/tests/lib/rules/no-unknown-property.js +++ b/tests/lib/rules/no-unknown-property.js @@ -46,11 +46,11 @@ ruleTester.run('no-unknown-property', rule, { { code: '
;' }, { code: 'Read more' }, { code: '' }, - { code: 'A cat sleeping on a keyboard' }, + { code: 'A cat sleeping on a keyboard' }, { code: '' }, { code: '' }, { code: '
' }, - { code: '