jfmengels/eslint-plugin-fp

no-nil false positive on switch statements

blackxored opened this issue · 1 comments

Take this function:

const someFunction = (state, action) => {
  switch (action.type) {
    case 'SOME_ACTION': {
      return assoc('anything', true, state);
    }
    default: {
      return state;
    }
  }
}

fp/no-nil complains about it. Am I missing something or this should not have an error on it?