nelsonic/este

View on GitHub
src/common/todos/reducer.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function todosReducer has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function todosReducer(state = new InitialState, action) {
  switch (action.type) {

    case actions.ADD_HUNDRED_TODOS: {
      const todos = action.payload.reduce((todos, json) =>
Severity: Minor
Found in src/common/todos/reducer.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

      return state;
    Severity: Major
    Found in src/common/todos/reducer.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return state.updateIn(['map', todo.id, 'completed'], value => !value);
      Severity: Major
      Found in src/common/todos/reducer.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return state.update('map', map => map.delete(id));
        Severity: Major
        Found in src/common/todos/reducer.js - About 30 mins to fix

          There are no issues that match your filters.

          Category
          Status