Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/eslint-plugin-react/lib/rules/no-unknown-property.js

    rd565449 r0c6b92a  
    416416 * Note - these exclusions are not made by React core team, but `eslint-plugin-react` community.
    417417 *
    418  * @param {String} name - Attribute name to be normalized
    419  * @returns {String} Result
     418 * @param {string} name - Attribute name to be normalized
     419 * @returns {string} Result
    420420 */
    421421function normalizeAttributeCase(name) {
     
    429429 * then the attribute is a valid data attribute.
    430430 *
    431  * @param {String} name - Attribute name to be tested
     431 * @param {string} name - Attribute name to be tested
    432432 * @returns {boolean} Result
    433433 */
     
    439439 * Checks if an attribute name has at least one uppercase characters
    440440 *
    441  * @param {String} name
     441 * @param {string} name
    442442 * @returns {boolean} Result
    443443 */
     
    450450 * of standard aria property names
    451451 *
    452  * @param {String} name - Attribute name to be tested
    453  * @returns {Boolean} Result
     452 * @param {string} name - Attribute name to be tested
     453 * @returns {boolean} Result
    454454 */
    455455
     
    461461 * Extracts the tag name for the JSXAttribute
    462462 * @param {JSXAttribute} node - JSXAttribute being tested.
    463  * @returns {String|null} tag name
     463 * @returns {string | null} tag name
    464464 */
    465465function 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  ) {
    467471    return node.parent.name.name;
    468472  }
     
    474478 * something like <Foo.bar />
    475479 * @param {JSXAttribute} node - JSXAttribute being tested.
    476  * @returns {Boolean} result
     480 * @returns {boolean} result
    477481 */
    478482function tagNameHasDot(node) {
     
    486490/**
    487491 * Get the standard name of the attribute.
    488  * @param {String} name - Name of the attribute.
    489  * @param {String} context - eslint context
    490  * @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.
    491495 */
    492496function getStandardName(name, context) {
     
    513517};
    514518
     519/** @type {import('eslint').Rule.RuleModule} */
    515520module.exports = {
    516521  meta: {
     
    593598
    594599        // 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;
    596603        if (tagName && allowedTags) {
    597604          // Scenario 1A: Allowed attribute found where not supposed to, report it
Note: See TracChangeset for help on using the changeset viewer.