How to fix this requireShorthandArrowFunctions arrow function so that it is compliant with JSCS?
const doSomething = () => { return new Promise((resolve, reject) => { resolve('success'); }); };
I know this is old but I just had the same issue. I figured out it's because your doSomething function does only one thing - it returns a promise. So, technically you shouldn't use a return statement and curly braces:
doSomething
return
const doSomething = () => new Promise((resolve, reject) => { resolve("success"); });
I know this is old but I just had the same issue. I figured out it's because your
doSomethingfunction does only one thing - it returns a promise. So, technically you shouldn't use areturnstatement and curly braces: