jfmengels / eslint-plugin-fp

ESLint rules for functional programming
MIT License
970 stars 36 forks source link

no-nil false positive on switch statements #36

Open blackxored opened 7 years ago

blackxored commented 7 years ago

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?

carmanchris31 commented 4 years ago

See https://github.com/jfmengels/eslint-plugin-fp/issues/14