Skip to content

Commit 90fc570

Browse files
committed
fix lint error
1 parent d8ebb4c commit 90fc570

File tree

1 file changed

+2
-36
lines changed

1 file changed

+2
-36
lines changed

lib/rules/no-unknown-property.js

+2-36
Original file line numberDiff line numberDiff line change
@@ -620,21 +620,6 @@ const ARIA_PROPERTIES = [
620620

621621
const ARIA_PROPERTIES_SET = new Set(ARIA_PROPERTIES);
622622

623-
// Map all dom property names and its lowercase name variant to original name, to avoid looping in getStandardName
624-
function buildDOMpropertyMap() {
625-
const propertyMap = {};
626-
627-
for (let i = 0; i < DOM_PROPERTY_NAMES.length; i++) {
628-
const propName = DOM_PROPERTY_NAMES[i];
629-
630-
propertyMap[propName.toLowerCase()] = propName;
631-
}
632-
633-
return propertyMap;
634-
}
635-
636-
const LOWER_CASED_DOM_PROPERTY_NAMES_MAP = buildDOMpropertyMap();
637-
638623
// ------------------------------------------------------------------------------
639624
// Helpers
640625
// ------------------------------------------------------------------------------
@@ -735,28 +720,9 @@ function tagNameHasDot(node) {
735720
);
736721
}
737722

738-
/**
739-
* Get the standard name of the attribute.
740-
* @param {string} name - Name of the attribute.
741-
* @returns {string | undefined} The standard name of the attribute, or undefined if no standard name was found.
742-
*/
743-
// function getStandardName(name) {
744-
// if (DOM_PROPERTY_NAMES_SET.has(name)) {
745-
// return DOM_PROPERTY_NAMES_SET.get(/** @type {keyof LOWER_CASED_DOM_PROPERTY_NAMES_MAP} */ (name));
746-
// }
747-
//
748-
// // const lowerCasedName = name.toLowerCase();
749-
// //
750-
// // if (Object.hasOwn(LOWER_CASED_DOM_PROPERTY_NAMES_MAP, lowerCasedName)) {
751-
// // return LOWER_CASED_DOM_PROPERTY_NAMES_MAP[lowerCasedName];
752-
// // }
753-
//
754-
// return null;
755-
// }
756-
757723
function isComponent(node) {
758724
return (
759-
node
725+
!!node
760726
&& node.name
761727
&& (node.name.type === 'JSXIdentifier' || node.name.type === 'JSXMemberExpression')
762728
&& !jsxUtil.isDOMComponent(node)
@@ -831,7 +797,7 @@ module.exports = {
831797
}
832798
}
833799

834-
const name = actualName; //normalizeAttributeCase(actualName);
800+
const name = actualName;
835801

836802
// Ignore tags like <Foo.bar />
837803
if (tagNameHasDot(node)) {

0 commit comments

Comments
 (0)