StackOverflow - javascript, node.js, eslint, arrow-functions, airbnb-js-styleguide

Eslint - Unexpected block statement surrounding arrow body

I just started using Airbnb's eslint config - and it seems really good. I am however getting the below error, and I'm unsure of what the fix is - I guess it's due to the function only existing to return a val. I've played around with it - but I can't seem to make it 'correct'. const getAccountInfo = ((e) => { return new Promise((resolve, reject) => { ... }); }); [eslint] Unexpected block statement surrounding arrow body (arrow-body-style) Thanks Ollie

Was this helpful?

Have a different question?

Can't find the answer you're looking for? Submit your own question to our community.

🛎️ Get Weekly OTA Fixes

New answers, vendor issues, and updates — straight to your inbox.