MCPcopy Index your code
hub / github.com/reactjs/react-codemod / doesNotUseArguments

Function doesNotUseArguments

transforms/class.js:240–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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) {

Callers 1

class.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected