Skip to content

Commit 9ff9ef9

Browse files
lounsbroughljharb
authored andcommitted
[New] no-unknown-property: add displaystyle on <math>
1 parent eb5bb85 commit 9ff9ef9

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
99
* [`sort-prop-types`]: give errors on TS types ([#3615][] @akulsr0)
1010
* [`no-invalid-html-attribute`]: add support for `apple-touch-startup-image` `rel` attributes in `link` tags ([#3638][] @thomashockaday)
1111
* [`no-unknown-property`]: add requireDataLowercase option ([#3645][] @HermanBilous)
12+
* [`no-unknown-property`]: add `displaystyle` on `<math>` ([#3652][] @lounsbrough)
1213

1314
### Fixed
1415
* [`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
2122
* [Refactor] [`function-component-definition`]: exit early if no type params ([#3634][] @HenryBrown0)
2223
* [Refactor] [`jsx-props-no-multi-spaces`]: extract type parameters to var ([#3634][] @HenryBrown0)
2324

25+
[#3652]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3652
2426
[#3645]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3645
2527
[#3638]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3638
2628
[#3634]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3634

lib/rules/no-unknown-property.js

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const ATTRIBUTE_TAGS_MAP = {
3434
checked: ['input'],
3535
// image is required for SVG support, all other tags are HTML.
3636
crossOrigin: ['script', 'img', 'video', 'audio', 'link', 'image'],
37+
displaystyle: ['math'],
3738
// https://html.spec.whatwg.org/multipage/links.html#downloading-resources
3839
download: ['a', 'area'],
3940
fill: [ // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill

tests/lib/rules/no-unknown-property.js

+1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ ruleTester.run('no-unknown-property', rule, {
161161
{ code: '<fbt desc="foo" doNotExtract />;' },
162162
// fbs
163163
{ code: '<fbs desc="foo" doNotExtract />;' },
164+
{ code: '<math displaystyle="true" />;' },
164165
]),
165166
invalid: parsers.all([
166167
{

0 commit comments

Comments
 (0)