From 386efc3f0e1ae60043c739cb28be00fbff7667db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20Marohni=C4=87?= Date: Fri, 29 Jun 2018 14:25:15 +0200 Subject: [PATCH] Make attribute "charset" valid The attribute "charset" was considered an error, but it results in valid HTML because HTML is case-insensitive. In other words, these two lines will be interpreted in the same way: https://github.com/facebook/react/issues/11492#issuecomment-342953964 --- lib/rules/no-unknown-property.js | 2 +- tests/lib/rules/no-unknown-property.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rules/no-unknown-property.js b/lib/rules/no-unknown-property.js index 59704d964a..5d03286fb7 100644 --- a/lib/rules/no-unknown-property.js +++ b/lib/rules/no-unknown-property.js @@ -117,7 +117,7 @@ const SVGDOM_ATTRIBUTE_NAMES = { const DOM_PROPERTY_NAMES = [ // Standard 'acceptCharset', 'accessKey', 'allowFullScreen', 'allowTransparency', 'autoComplete', 'autoFocus', 'autoPlay', - 'cellPadding', 'cellSpacing', 'charSet', 'classID', 'className', 'colSpan', 'contentEditable', 'contextMenu', + 'cellPadding', 'cellSpacing', 'classID', 'className', 'colSpan', 'contentEditable', 'contextMenu', 'dateTime', 'encType', 'formAction', 'formEncType', 'formMethod', 'formNoValidate', 'formTarget', 'frameBorder', 'hrefLang', 'htmlFor', 'httpEquiv', 'inputMode', 'keyParams', 'keyType', 'marginHeight', 'marginWidth', 'maxLength', 'mediaGroup', 'minLength', 'noValidate', 'onAnimationEnd', 'onAnimationIteration', 'onAnimationStart', diff --git a/tests/lib/rules/no-unknown-property.js b/tests/lib/rules/no-unknown-property.js index 6bb38c0703..ea94c86717 100644 --- a/tests/lib/rules/no-unknown-property.js +++ b/tests/lib/rules/no-unknown-property.js @@ -30,6 +30,8 @@ ruleTester.run('no-unknown-property', rule, { {code: ';'}, {code: ';'}, {code: ';'}, + {code: ';'}, + {code: ';'}, {code: ';'}, {code: ';'}, {code: ';'},