Changeset 0c6b92a for imaps-frontend/node_modules/eslint-plugin-react/lib/rules/jsx-props-no-multi-spaces.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/eslint-plugin-react/lib/rules/jsx-props-no-multi-spaces.js
rd565449 r0c6b92a 9 9 const eslintUtil = require('../util/eslint'); 10 10 const report = require('../util/report'); 11 const propsUtil = require('../util/props'); 11 12 12 13 const getSourceCode = eslintUtil.getSourceCode; … … 104 105 105 106 function containsGenericType(node) { 106 const nodeType Params = node.typeParameters;107 if (typeof nodeType Params === 'undefined') {107 const nodeTypeArguments = propsUtil.getTypeArguments(node); 108 if (typeof nodeTypeArguments === 'undefined') { 108 109 return false; 109 110 } 110 111 111 return nodeType Params.type === 'TSTypeParameterInstantiation';112 return nodeTypeArguments.type === 'TSTypeParameterInstantiation'; 112 113 } 113 114 … … 115 116 const name = node.name; 116 117 if (containsGenericType(node)) { 117 const type = node.typeParameters;118 const nodeTypeArguments = propsUtil.getTypeArguments(node); 118 119 119 120 return Object.assign( … … 123 124 range: [ 124 125 name.range[0], 125 type.range[1],126 nodeTypeArguments.range[1], 126 127 ], 127 128 }
Note:
See TracChangeset
for help on using the changeset viewer.