Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add displaystyle as known property on math elements #3652

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<math>` ([#3652][] @lounsbrough)

### Fixed
* [`jsx-no-leaked-render`]: preserve RHS parens for multiline jsx elements while fixing ([#3623][] @akulsr0)
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-unknown-property.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/lib/rules/no-unknown-property.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ ruleTester.run('no-unknown-property', rule, {
{ code: '<fbt desc="foo" doNotExtract />;' },
// fbs
{ code: '<fbs desc="foo" doNotExtract />;' },
{ code: '<math displaystyle="true" />;' },
]),
invalid: parsers.all([
{
Expand Down
Loading