diff --git a/CHANGELOG.md b/CHANGELOG.md index 1572345855..74b1adda7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange * [`no-unknown-property`]: allow `imageSrcSet` and `imageSizes` attributes on `` ([#3407][] @terrymun) * [`no-unknown-property`]: add `border`; `focusable` on `` ([#3404][] [#3404][] @ljharb) * [`no-unknown-property`]: React lowercases `data-` attrs ([#3395][] @ljharb) +* [`no-unknown-property`]: add `valign` on table components ([#3389][] @ljharb) [#3407]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3407 [#3406]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3406 @@ -28,6 +29,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange [#3395]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3395 [#3394]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3394 [#3391]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3391 +[#3389]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3389 ## [7.31.6] - 2022.09.04 diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index b6f1ff816a..35bb5b0824 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -63,6 +63,7 @@ const ATTRIBUTE_TAGS_MAP = { property: ['meta'], viewBox: ['svg'], 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 onAbort: ['audio', 'video'], onCanPlay: ['audio', 'video'], @@ -88,9 +89,6 @@ const ATTRIBUTE_TAGS_MAP = { onTimeUpdate: ['audio', 'video'], onVolumeChange: ['audio', 'video'], onWaiting: ['audio', 'video'], - scrolling: ['iframe'], - playsInline: ['video'], - // Video related attributes autoPictureInPicture: ['video'], controls: ['audio', 'video'], controlsList: ['audio', 'video'], @@ -98,8 +96,10 @@ const ATTRIBUTE_TAGS_MAP = { disableRemotePlayback: ['audio', 'video'], loop: ['audio', 'video'], muted: ['audio', 'video'], + playsInline: ['video'], poster: ['video'], preload: ['audio', 'video'], + scrolling: ['iframe'], }; const SVGDOM_ATTRIBUTE_NAMES = { diff --git a/tests/lib/rules/no-unknown-property.js b/tests/lib/rules/no-unknown-property.js index 82e7b50c79..12f294d70c 100644 --- a/tests/lib/rules/no-unknown-property.js +++ b/tests/lib/rules/no-unknown-property.js @@ -119,6 +119,23 @@ ruleTester.run('no-unknown-property', rule, { { code: 'Audio content' }, { code: '' }, { code: '' }, + { + code: ` + + + + + + + + + + + + +
HeaderCell
+ `, + }, // fbt { code: ';' },