Unexpected block statement surrounding arrow body

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?

Answer

The block statement isn't needed for a single expression.

this.state.todos.filter(filterTodo => filterTodo !== todo);

以上是 Unexpected block statement surrounding arrow body 的全部内容, 来源链接: utcz.com/a/24075.html

回到顶部