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/jsx-props-no-multi-spaces.js

    rd565449 r0c6b92a  
    99const eslintUtil = require('../util/eslint');
    1010const report = require('../util/report');
     11const propsUtil = require('../util/props');
    1112
    1213const getSourceCode = eslintUtil.getSourceCode;
     
    104105
    105106    function containsGenericType(node) {
    106       const nodeTypeParams = node.typeParameters;
    107       if (typeof nodeTypeParams === 'undefined') {
     107      const nodeTypeArguments = propsUtil.getTypeArguments(node);
     108      if (typeof nodeTypeArguments === 'undefined') {
    108109        return false;
    109110      }
    110111
    111       return nodeTypeParams.type === 'TSTypeParameterInstantiation';
     112      return nodeTypeArguments.type === 'TSTypeParameterInstantiation';
    112113    }
    113114
     
    115116      const name = node.name;
    116117      if (containsGenericType(node)) {
    117         const type = node.typeParameters;
     118        const nodeTypeArguments = propsUtil.getTypeArguments(node);
    118119
    119120        return Object.assign(
     
    123124            range: [
    124125              name.range[0],
    125               type.range[1],
     126              nodeTypeArguments.range[1],
    126127            ],
    127128          }
Note: See TracChangeset for help on using the changeset viewer.