Umair Umair - 7 months ago 601
Javascript Question

Unexpected block statement surrounding arrow body ESlint

Why is this piece of code giving me lint warnings? What's the workaround? Any help would be appreciated.

const configureStore = () => {
return createStore(

That's my eslint configuration

"parser": "babel-eslint",
"extends": "airbnb",
"plugins": [
"rules": {
"comma-dangle": 0,
"object-curly-spacing": 0,
"no-multiple-empty-lines": [
"max": 1
"arrow-body-style": 1,
"newline-per-chained-call": 1
"env": {
"browser": true,
"node": true,
"mocha": true


It's a little hard to debug not knowing your particular lint config.

My only guess is that your linter is configured in a way that complains if you use a block on an arrow body which contains only a single expression


const configureStore = () =>
  createStore(rootReducer, middleware);

If that doesn't work, please provide a comment


ps, if you paste your exact code in, there are no lint warnings