Changeset 0c6b92a for imaps-frontend/node_modules/eslint-plugin-react/lib/rules/no-unknown-property.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/eslint-plugin-react/lib/rules/no-unknown-property.js
rd565449 r0c6b92a 416 416 * Note - these exclusions are not made by React core team, but `eslint-plugin-react` community. 417 417 * 418 * @param { String} name - Attribute name to be normalized419 * @returns { String} Result418 * @param {string} name - Attribute name to be normalized 419 * @returns {string} Result 420 420 */ 421 421 function normalizeAttributeCase(name) { … … 429 429 * then the attribute is a valid data attribute. 430 430 * 431 * @param { String} name - Attribute name to be tested431 * @param {string} name - Attribute name to be tested 432 432 * @returns {boolean} Result 433 433 */ … … 439 439 * Checks if an attribute name has at least one uppercase characters 440 440 * 441 * @param { String} name441 * @param {string} name 442 442 * @returns {boolean} Result 443 443 */ … … 450 450 * of standard aria property names 451 451 * 452 * @param { String} name - Attribute name to be tested453 * @returns { Boolean} Result452 * @param {string} name - Attribute name to be tested 453 * @returns {boolean} Result 454 454 */ 455 455 … … 461 461 * Extracts the tag name for the JSXAttribute 462 462 * @param {JSXAttribute} node - JSXAttribute being tested. 463 * @returns { String|null} tag name463 * @returns {string | null} tag name 464 464 */ 465 465 function getTagName(node) { 466 if (node && node.parent && node.parent.name && node.parent.name) { 466 if ( 467 node 468 && node.parent 469 && node.parent.name 470 ) { 467 471 return node.parent.name.name; 468 472 } … … 474 478 * something like <Foo.bar /> 475 479 * @param {JSXAttribute} node - JSXAttribute being tested. 476 * @returns { Boolean} result480 * @returns {boolean} result 477 481 */ 478 482 function tagNameHasDot(node) { … … 486 490 /** 487 491 * Get the standard name of the attribute. 488 * @param { String} name - Name of the attribute.489 * @param { String} context - eslint context490 * @returns { String | undefined} The standard name of the attribute, or undefined if no standard name was found.492 * @param {string} name - Name of the attribute. 493 * @param {object} context - eslint context 494 * @returns {string | undefined} The standard name of the attribute, or undefined if no standard name was found. 491 495 */ 492 496 function getStandardName(name, context) { … … 513 517 }; 514 518 519 /** @type {import('eslint').Rule.RuleModule} */ 515 520 module.exports = { 516 521 meta: { … … 593 598 594 599 // Some attributes are allowed on some tags only 595 const allowedTags = has(ATTRIBUTE_TAGS_MAP, name) ? ATTRIBUTE_TAGS_MAP[/** @type {keyof ATTRIBUTE_TAGS_MAP} */ (name)] : null; 600 const allowedTags = has(ATTRIBUTE_TAGS_MAP, name) 601 ? ATTRIBUTE_TAGS_MAP[/** @type {keyof ATTRIBUTE_TAGS_MAP} */ (name)] 602 : null; 596 603 if (tagName && allowedTags) { 597 604 // Scenario 1A: Allowed attribute found where not supposed to, report it
Note:
See TracChangeset
for help on using the changeset viewer.