Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/eslint-plugin-react/lib/rules/display-name.js
rd565449 r0c6b92a 74 74 * Checks if React.forwardRef is nested inside React.memo 75 75 * @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. 77 77 */ 78 78 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); 82 83 } 83 84 … … 112 113 * Checks if the component have a name set by the transpiler 113 114 * @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. 115 116 */ 116 117 function hasTranspilerName(node) { … … 199 200 return; 200 201 } 201 markDisplayNameAsDeclared( component.node.type === 'TSAsExpression' ? component.node.expression : component.node);202 markDisplayNameAsDeclared(astUtil.unwrapTSAsExpression(component.node)); 202 203 }, 203 204
Note:
See TracChangeset
for help on using the changeset viewer.