jfmengels/eslint-plugin-fp
View on GitHubno-nil doesn't seem to understand default switch case
Open
#14 opened on Oct 15, 2016
bughelp wanted
Repository metrics
- Stars
- (968 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
const reducer = (state = {}, action) => {
switch (action.type) {
case 'CHANGE_TEXT':
return { text: action.payload };
default:
return state;
}
};
This function will always return something, but sadly I get the error Function must end with a return statement, so that it doesn't return undefined fp/no-nil.