Unexpected block statement surrounding arrow body

Viewed 49292

I'm using "eslint-config-airbnb": "^6.1.0", to keep my JavaScript clean.

My linter is unhappy with what seems to be legitimate code:

enter image description here

It seems like this might be an ongoing issue. Does anyone have any suggestions for an OCD developer on how to address this in the meantime? Perhaps disabling this rule or otherwise?

3 Answers

If you really don't want to wrap arrow function inside block statement then you can turn off.

module.exports = {
  extends: "airbnb-base",
  rules: {
    "arrow-body-style": 0
  },
  "env": {
    "jest": true
  }
};
Related