简体   繁体   English

带出口声明的ESLint缩进问题

[英]ESLint indentation issue w/ export statements

consider the following statement: 考虑以下语句:

export const sort = (state = 'SORTED_BY_DATE', action) => {
  switch (action.type) {
    case C.SORT_COLORS:
      return action.sortBy
    default:
      return state
  }
}

I'm getting errors like (consider the line return state ): 我收到类似(考虑行return state )的错误:

error  Expected indentation of 2 spaces but found 4   indent

It's also expective the switch statement to be shifted left two spaces. 还期望将switch语句向左移动两个空格。

How do I fix this? 我该如何解决?

需要更新选项SwitchCase: 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM