From 9ff9ef9622b1e90c89cd2342fd525d1a7c95d809 Mon Sep 17 00:00:00 2001 From: David Lounsbrough Date: Mon, 13 Nov 2023 10:03:19 -0600 Subject: [PATCH] [New] `no-unknown-property`: add `displaystyle` on `` --- CHANGELOG.md | 2 ++ lib/rules/no-unknown-property.js | 1 + tests/lib/rules/no-unknown-property.js | 1 + 3 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f76e6f3728..bdb2d0e888 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange * [`sort-prop-types`]: give errors on TS types ([#3615][] @akulsr0) * [`no-invalid-html-attribute`]: add support for `apple-touch-startup-image` `rel` attributes in `link` tags ([#3638][] @thomashockaday) * [`no-unknown-property`]: add requireDataLowercase option ([#3645][] @HermanBilous) +* [`no-unknown-property`]: add `displaystyle` on `` ([#3652][] @lounsbrough) ### Fixed * [`jsx-no-leaked-render`]: preserve RHS parens for multiline jsx elements while fixing ([#3623][] @akulsr0) @@ -21,6 +22,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange * [Refactor] [`function-component-definition`]: exit early if no type params ([#3634][] @HenryBrown0) * [Refactor] [`jsx-props-no-multi-spaces`]: extract type parameters to var ([#3634][] @HenryBrown0) +[#3652]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3652 [#3645]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3645 [#3638]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3638 [#3634]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3634 diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index 069596d73c..2fc127b15f 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -34,6 +34,7 @@ const ATTRIBUTE_TAGS_MAP = { checked: ['input'], // image is required for SVG support, all other tags are HTML. crossOrigin: ['script', 'img', 'video', 'audio', 'link', 'image'], + displaystyle: ['math'], // https://html.spec.whatwg.org/multipage/links.html#downloading-resources download: ['a', 'area'], fill: [ // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill diff --git a/tests/lib/rules/no-unknown-property.js b/tests/lib/rules/no-unknown-property.js index d6713286c1..54c23785dd 100644 --- a/tests/lib/rules/no-unknown-property.js +++ b/tests/lib/rules/no-unknown-property.js @@ -161,6 +161,7 @@ ruleTester.run('no-unknown-property', rule, { { code: ';' }, // fbs { code: ';' }, + { code: ';' }, ]), invalid: parsers.all([ {