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/display-name.js

    rd565449 r0c6b92a  
    7474     * Checks if React.forwardRef is nested inside React.memo
    7575     * @param {ASTNode} node The AST node being checked.
    76      * @returns {Boolean} True if React.forwardRef is nested inside React.memo, false if not.
     76     * @returns {boolean} True if React.forwardRef is nested inside React.memo, false if not.
    7777     */
    7878    function isNestedMemo(node) {
    79       const argumentIsCallExpression = node.arguments && node.arguments[0] && node.arguments[0].type === 'CallExpression';
    80 
    81       return node.type === 'CallExpression' && argumentIsCallExpression && utils.isPragmaComponentWrapper(node);
     79      return astUtil.isCallExpression(node)
     80        && node.arguments
     81        && astUtil.isCallExpression(node.arguments[0])
     82        && utils.isPragmaComponentWrapper(node);
    8283    }
    8384
     
    112113     * Checks if the component have a name set by the transpiler
    113114     * @param {ASTNode} node The AST node being checked.
    114      * @returns {Boolean} True if component has a name, false if not.
     115     * @returns {boolean} True if component has a name, false if not.
    115116     */
    116117    function hasTranspilerName(node) {
     
    199200          return;
    200201        }
    201         markDisplayNameAsDeclared(component.node.type === 'TSAsExpression' ? component.node.expression : component.node);
     202        markDisplayNameAsDeclared(astUtil.unwrapTSAsExpression(component.node));
    202203      },
    203204
Note: See TracChangeset for help on using the changeset viewer.