Skip to content

Commit 487ef70

Browse files
sjarvaljharb
authored andcommitted
[Fix] no-unknown-property: move allowfullscreen to case ignored attributes
1 parent 9a77a1b commit 487ef70

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
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
* [`no-unknown-property`]: `onError` and `onLoad` both work on `img` and `script` ([#3388][] @ljharb)
1010
* [`no-unknown-property`]: data-* attributes can have numbers ([#3390][] @sjarva)
1111
* [`no-unknown-property`]: add more audio/video attributes ([#3390][] @sjarva)
12+
* [`no-unknown-property`]: move allowfullscreen to case ignored attributes ([#3390][] @sjarva)
1213

1314
[#3390]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3390
1415
[#3388]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3388

lib/rules/no-unknown-property.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ const DOM_PROPERTY_NAMES_TWO_WORDS = [
221221
// Element specific attributes
222222
// See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes (includes global attributes too)
223223
// To be considered if these should be added also to ATTRIBUTE_TAGS_MAP
224-
'acceptCharset', 'allowFullScreen', 'autoComplete', 'autoPlay', 'cellPadding', 'cellSpacing', 'classID', 'codeBase',
224+
'acceptCharset', 'autoComplete', 'autoPlay', 'cellPadding', 'cellSpacing', 'classID', 'codeBase',
225225
'colSpan', 'contextMenu', 'dateTime', 'encType', 'formAction', 'formEncType', 'formMethod', 'formNoValidate', 'formTarget',
226226
'frameBorder', 'hrefLang', 'httpEquiv', 'isMap', 'keyParams', 'keyType', 'marginHeight', 'marginWidth',
227227
'maxLength', 'mediaGroup', 'minLength', 'noValidate', 'onAnimationEnd', 'onAnimationIteration', 'onAnimationStart',
@@ -274,7 +274,7 @@ const DOM_PROPERTY_NAMES_TWO_WORDS = [
274274
'autoPictureInPicture', 'controlList', 'disablePictureInPicture', 'disableRemotePlayback',
275275
];
276276

277-
const DOM_PROPERTIES_IGNORE_CASE = ['charset'];
277+
const DOM_PROPERTIES_IGNORE_CASE = ['charset', 'allowfullscreen'];
278278

279279
const ARIA_PROPERTIES = [
280280
// See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ ruleTester.run('no-unknown-property', rule, {
393393
],
394394
},
395395
{
396-
code: '<div controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true}></div>',
396+
code: '<div controls={this.controls} loop={true} muted={false} src={this.videoSrc} playsInline={true} allowFullScreen></div>',
397397
errors: [
398398
{
399399
messageId: 'invalidPropOnTag',

0 commit comments

Comments
 (0)