From 1c0c92b1d575c4c15c2aa18e80dfb3d04805a5b5 Mon Sep 17 00:00:00 2001 From: Senja Jarva Date: Mon, 5 Sep 2022 14:21:49 +0300 Subject: [PATCH] [Fix] `no-unknown-property`: Add more one word properties found in DefinitelyTyped's react/index.d.ts Manifest, summary, wmode, results, security --- CHANGELOG.md | 1 + lib/rules/no-unknown-property.js | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6df9c7c6fc..5af53fd728 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange * [`no-unknown-property`]: allow `webkitAllowFullScreen` and `mozAllowFullScreen` ([#3396][] @ljharb) * [`no-unknown-property`]: `controlsList`, not `controlList` ([#3397][] @ljharb) * [`no-unknown-property`]: add more capture event properties ([#3402][] @sjarva) +* [`no-unknown-property`]: Add more one word properties found in DefinitelyTyped's react/index.d.ts ([#3402][] @sjarva) [#3402]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3402 [#3397]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3397 diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index 4ef0304ab1..b3850ddd87 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -194,10 +194,10 @@ const DOM_PROPERTY_NAMES_ONE_WORD = [ 'accept', 'action', 'allow', 'alt', 'as', 'async', 'buffered', 'capture', 'challenge', 'cite', 'code', 'cols', 'content', 'coords', 'csp', 'data', 'decoding', 'default', 'defer', 'disabled', 'form', 'headers', 'height', 'high', 'href', 'icon', 'importance', 'integrity', 'kind', 'label', - 'language', 'loading', 'list', 'loop', 'low', 'max', 'media', 'method', 'min', 'multiple', 'muted', + 'language', 'loading', 'list', 'loop', 'low', 'manifest', 'max', 'media', 'method', 'min', 'multiple', 'muted', 'name', 'open', 'optimum', 'pattern', 'ping', 'placeholder', 'poster', 'preload', 'profile', - 'rel', 'required', 'reversed', 'role', 'rows', 'sandbox', 'scope', 'selected', 'shape', 'size', 'sizes', - 'span', 'src', 'start', 'step', 'target', 'type', 'value', 'width', 'wrap', + 'rel', 'required', 'reversed', 'role', 'rows', 'sandbox', 'scope', 'seamless', 'selected', 'shape', 'size', 'sizes', + 'span', 'src', 'start', 'step', 'summary', 'target', 'type', 'value', 'width', 'wmode', 'wrap', // SVG attributes // See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute 'accumulate', 'additive', 'alphabetic', 'amplitude', 'ascent', 'azimuth', 'bbox', 'begin', @@ -214,6 +214,8 @@ const DOM_PROPERTY_NAMES_ONE_WORD = [ 'property', // React specific attributes 'ref', 'key', 'children', + // Non-standard + 'results', 'security', // Video specific 'controls', ];