Spread operator and EsLint
问题 I want to copy object and change one of its field. Something like this: const initialState = { showTagPanel: false, }; export default function reducerFoo(state = initialState, action) { switch(action.type) { case types.SHOW_TAG_PANEL: console.log(state); return { ...state, showTagPanel: true }; default: return state; } } This code works fine, but eslint show me error Unexpected token (14:8) 12 | 13 | return { > 14 | ...state, | ^ 15 | showTagPanel: true 16 | }; 17 | Here is my .eslintrc: {