How to fix this requireShorthandArrowFunctions arrow function so that it is compliant with JSCS?
const doSomething = () => {
return new Promise((resolve, reject) => {
resolve('success');
});
};
How to fix this requireShorthandArrowFunctions arrow function so that it is compliant with JSCS?
const doSomething = () => {
return new Promise((resolve, reject) => {
resolve('success');
});
};
Copyright © 2021 Jogjafile Inc.
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: