Changeset 0c6b92a for imaps-frontend/node_modules/eslint-plugin-react/lib/rules/no-array-index-key.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/eslint-plugin-react/lib/rules/no-array-index-key.js
rd565449 r0c6b92a 190 190 } 191 191 192 if (node.type === 'CallExpression' 193 && node.callee 194 && node.callee.type === 'MemberExpression' 195 && node.callee.object 196 && isArrayIndex(node.callee.object) 197 && node.callee.property 198 && node.callee.property.type === 'Identifier' 199 && node.callee.property.name === 'toString' 192 if ( 193 astUtil.isCallExpression(node) 194 && node.callee 195 && node.callee.type === 'MemberExpression' 196 && node.callee.object 197 && isArrayIndex(node.callee.object) 198 && node.callee.property 199 && node.callee.property.type === 'Identifier' 200 && node.callee.property.name === 'toString' 200 201 ) { 201 202 // key={bar.toString()} … … 206 207 } 207 208 208 if (node.type === 'CallExpression' 209 && node.callee 210 && node.callee.type === 'Identifier' 211 && node.callee.name === 'String' 212 && Array.isArray(node.arguments) 213 && node.arguments.length > 0 214 && isArrayIndex(node.arguments[0]) 209 if ( 210 astUtil.isCallExpression(node) 211 && node.callee 212 && node.callee.type === 'Identifier' 213 && node.callee.name === 'String' 214 && Array.isArray(node.arguments) 215 && node.arguments.length > 0 216 && isArrayIndex(node.arguments[0]) 215 217 ) { 216 218 // key={String(bar)}
Note:
See TracChangeset
for help on using the changeset viewer.