| 238 | }; |
| 239 | |
| 240 | const doesNotUseArguments = classPath => { |
| 241 | const hasArguments = ( |
| 242 | j(classPath).find(j.Identifier, {name: 'arguments'}).size() > 0 |
| 243 | ); |
| 244 | if (hasArguments) { |
| 245 | console.warn( |
| 246 | file.path + ': `' + ReactUtils.directlyGetComponentName(classPath) + '` ' + |
| 247 | 'was skipped because `arguments` was found in your functions. ' + |
| 248 | 'Arrow functions do not expose an `arguments` object; ' + |
| 249 | 'consider changing to use ES6 spread operator and re-run this script.' |
| 250 | ); |
| 251 | return false; |
| 252 | } |
| 253 | return true; |
| 254 | }; |
| 255 | |
| 256 | const isGetInitialStateConstructorSafe = getInitialState => { |
| 257 | if (!getInitialState) { |